org.glassfish.grizzly.Connection.assertOpen()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.glassfish.grizzly.Connection.assertOpen()方法的一些代码示例,展示了Connection.assertOpen()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connection.assertOpen()方法的具体详情如下:
包路径:org.glassfish.grizzly.Connection
类名称:Connection
方法名:assertOpen

Connection.assertOpen介绍

[英]Checks if this Connection is open and ready to be used. If this Connection is closed - this method throws IOException giving the reason why this Connection was closed.
[中]检查此连接是否已打开并准备好使用。如果此连接已关闭-此方法引发IOException,给出关闭此连接的原因。

代码示例

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

public void writeChar(int c) throws IOException {
  connection.assertOpen();
  if (closed) {
    return;
  }
  updateNonBlockingStatus();
  checkCharBuffer();
  if (charsArrayLength == charsArray.length) {
    flushCharsToBuf(true);
  }
  charsArray[charsArrayLength++] = (char) c;
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

代码示例来源:origin: javaee/grizzly

/**
 * Flush the response.
 *
 * @throws java.io.IOException an underlying I/O error occurred
 */
public void flush() throws IOException {
  connection.assertOpen();
  final boolean isJustCommitted = doCommit();
  if (!flushAllBuffers(false) && isJustCommitted) {
    forceCommitHeaders(false);
  }
  blockAfterWriteIfNeeded();      
}

相关文章