public final class TCPNIOServerConnection extends TCPNIOConnection
| Modifier and Type | Class and Description |
|---|---|
protected class |
TCPNIOServerConnection.RegisterAcceptedChannelCompletionHandler |
TCPNIOConnection.ConnectResultHandlerConnection.CloseListener, Connection.CloseTypeattributes, channel, connectCloseSemaphorUpdater, isBlocking, isStandalone, maxAsyncWriteQueueSize, monitoringConfig, NOTIFICATION_CLOSED_COMPLETE, NOTIFICATION_INITIALIZED, processor, processorSelector, readTimeoutMillis, selectionKey, selectorRunner, transport, 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 |
protected void |
closeGracefully0(CompletionHandler<Closeable> completionHandler,
CloseReason closeReason) |
int |
getReadBufferSize()
Get the default size of
Buffers, which will be allocated for
reading data from Connection. |
int |
getWriteBufferSize()
Get the default size of
Buffers, which will be allocated for
writing data to Connection. |
boolean |
isBlocking() |
boolean |
isStandalone() |
void |
listen() |
void |
onAccept()
Method will be called by framework, when async accept will be ready
|
void |
preClose() |
protected void |
resetProperties() |
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. |
canWrite, canWrite, checkConnectFailed, enableInitialOpRead, getLocalAddress, getPeerAddress, notifyCanWrite, notifyCanWrite, notifyReady, onConnect, onRead, onWrite, setConnectResultHandler, setSelectionKey, setSelectorRunner, terminate0, toStringaddCloseListener, addCloseListener, assertOpen, attachToSelectorRunner, checkEmptyRead, close, close, closeFuture, closeSilently, closeWithReason, configureBlocking, configureStandalone, detachSelectorRunner, disableIOEvent, doClose, enableIOEvent, executeInEventThread, getAsyncReadQueue, getAsyncWriteQueue, getAttributes, getChannel, getCloseReason, getMaxAsyncWriteQueueSize, getMemoryManager, getMonitoringConfig, getProcessor, getProcessorSelector, getReadTimeout, getSelectionKey, getSelectorRunner, getTransport, getWriteTimeout, isClosed, isOpen, notifyConnectionError, notifyIOEventDisabled, notifyIOEventEnabled, notifyIOEventReady, notifyProbesAccept, notifyProbesBind, notifyProbesClose, notifyProbesConnect, notifyProbesError, notifyProbesRead, notifyProbesWrite, obtainProcessor, obtainProcessorState, read, read, removeCloseListener, removeCloseListener, setChannel, setMaxAsyncWriteQueueSize, setProcessor, setProcessorSelector, setReadTimeout, setWriteTimeout, simulateIOEvent, terminate, terminateSilently, terminateWithReason, write, 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)
TCPNIOConnectionBuffers, which will be allocated for
reading data from Connection.
The value less or equal to zero will be ignored.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)
TCPNIOConnectionBuffers, 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.public int getReadBufferSize()
TCPNIOConnectionBuffers, which will be allocated for
reading data from Connection.
The value less or equal to zero will be ignored.getReadBufferSize in interface Connection<SocketAddress>getReadBufferSize in class TCPNIOConnectionBuffers, which will be allocated for
reading data from Connection.public int getWriteBufferSize()
TCPNIOConnectionBuffers, which will be allocated for
writing data to Connection.getWriteBufferSize in interface Connection<SocketAddress>getWriteBufferSize in class TCPNIOConnectionBuffers, which will be allocated for
writing data to Connection.protected void closeGracefully0(CompletionHandler<Closeable> completionHandler, CloseReason closeReason)
closeGracefully0 in class NIOConnectionprotected void resetProperties()
resetProperties in class TCPNIOConnectionCopyright © 2016 Oracle Corporation. All Rights Reserved.