public final class TCPNIOServerConnection extends TCPNIOConnection
| Modifier and Type | Class and Description |
|---|---|
protected class |
TCPNIOServerConnection.RegisterAcceptedChannelCompletionHandler |
Connection.CloseListener, Connection.CloseTypeasyncReadQueue, asyncWriteQueue, attributes, channel, closeTypeFlag, connectCloseSemaphor, isBlocking, isStandalone, maxAsyncWriteQueueSize, monitoringConfig, NOTIFICATION_CLOSED_COMPLETE, NOTIFICATION_INITIALIZED, processor, processorSelector, readBufferSize, readTimeoutMillis, selectionKey, selectorRunner, transport, writeBufferSize, writeTimeoutMillis, zeroByteReadCount| Constructor and Description |
|---|
TCPNIOServerConnection(TCPNIOTransport transport,
ServerSocketChannel serverSocketChannel) |
| Modifier and Type | Method and Description |
|---|---|
GrizzlyFuture<Connection> |
accept()
Accept a
Connection. |
protected GrizzlyFuture<Connection> |
acceptAsync()
Asynchronously accept a
Connection |
boolean |
isBlocking() |
boolean |
isStandalone() |
void |
listen() |
void |
onAccept()
Method will be called by framework, when async accept will be ready
|
void |
preClose() |
void |
setReadBufferSize(int readBufferSize)
Set the default size of
Buffers, which will be allocated for
reading data from Connection. |
void |
setWriteBufferSize(int writeBufferSize)
Set the default size of
Buffers, which will be allocated for
writing data to Connection. |
checkConnectFailed, close0, getLocalAddress, getPeerAddress, notifyReady, onConnect, onRead, onWrite, resetProperties, setConnectCompletionHandler, setSelectionKey, setSelectorRunner, toStringaddCloseListener, attachToSelectorRunner, checkEmptyRead, close, close, closeSilently, configureBlocking, configureStandalone, detachSelectorRunner, disableIOEvent, enableIOEvent, getAsyncReadQueue, getAsyncWriteQueue, getAttributes, getChannel, getMaxAsyncWriteQueueSize, getMonitoringConfig, getProcessor, getProcessorSelector, getReadBufferSize, getReadTimeout, getSelectionKey, getSelectorRunner, getTransport, getWriteBufferSize, getWriteTimeout, isOpen, notifyConnectionError, notifyIOEventDisabled, notifyIOEventEnabled, notifyIOEventReady, notifyProbesAccept, notifyProbesBind, notifyProbesClose, notifyProbesConnect, notifyProbesError, notifyProbesRead, notifyProbesWrite, obtainProcessor, obtainProcessorState, read, read, removeCloseListener, setChannel, setMaxAsyncWriteQueueSize, setProcessor, setProcessorSelector, setReadTimeout, setWriteTimeout, simulateIOEvent, write, write, write, writepublic TCPNIOServerConnection(TCPNIOTransport transport, ServerSocketChannel serverSocketChannel)
public void listen()
throws IOException
IOExceptionpublic boolean isBlocking()
isBlocking in interface Connection<SocketAddress>isBlocking in class NIOConnectionConnection mode.
true, if Connection is operating in blocking mode, or
false otherwise.public boolean isStandalone()
isStandalone in interface Connection<SocketAddress>isStandalone in class NIOConnectionpublic GrizzlyFuture<Connection> accept() throws IOException
Connection. Could be used only in standalone mode.
See Connection.configureStandalone(boolean).FutureIOExceptionprotected GrizzlyFuture<Connection> acceptAsync() throws IOException
ConnectionFutureIOExceptionpublic void preClose()
preClose in class TCPNIOConnectionpublic void onAccept()
throws IOException
IOExceptionpublic void setReadBufferSize(int readBufferSize)
ConnectionBuffers, which will be allocated for
reading data from Connection.setReadBufferSize in interface Connection<SocketAddress>setReadBufferSize in class TCPNIOConnectionreadBufferSize - the default size of Buffers, which will
be allocated for reading data from Connection.public void setWriteBufferSize(int writeBufferSize)
ConnectionBuffers, which will be allocated for
writing data to Connection.setWriteBufferSize in interface Connection<SocketAddress>setWriteBufferSize in class TCPNIOConnectionwriteBufferSize - the default size of Buffers, which will
be allocated for writing data to Connection.Copyright © 2013 Oracle Corporation. All Rights Reserved.