org.glassfish.grizzly.Connection implementation for the TCPNIOTransport
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | TCPNIOConnection.
This interface implementations can be used to be notified about the TCPNIOConnection connect state. |
| Modifier and Type | Field and Description |
|---|---|
| private AtomicReference | |
| pack-priv Holder | |
| private static final Logger | |
| pack-priv Holder | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| protected final void | checkConnectFailed(Throwable failure)
Method will be called in order to check if failure happened before |
| protected void | enableInitialOpRead()
Overrides org. Enables OP_READ if it has never been enabled before. |
| public SocketAddress | Returns: the local address of this Connection, or null if it is unconnected.Implements org. Returns the local address of this Connection, or null if it is unconnected. |
| public SocketAddress | Returns: the address of the endpoint this Connection is connected to, or null if it is unconnected.Implements org. Returns the address of the endpoint this Connection is connected to, or null if it is unconnected. |
| public int | getReadBufferSize()
Implements org. Get the default size of |
| public int | getWriteBufferSize()
Implements org. Get the default size of |
| public void | notifyCanWrite(final WriteHandler writeHandler)
Implements org. Instructs the |
| public void | notifyCanWrite(WriteHandler handler, int length)
Implements org.
Deprecated
Instructs the |
| protected boolean | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected void | |
| protected void | |
| protected final void | |
| public void | setReadBufferSize(final int readBufferSize)
Implements org. Set the default size of |
| protected void | setSelectionKey(SelectionKey selectionKey)
Overrides org.
|
| protected void | setSelectorRunner(SelectorRunner selectorRunner)
Overrides org.
|
| public void | setWriteBufferSize(int writeBufferSize)
Implements org. Set the default size of |
| protected void | terminate0(final CompletionHandler<Closeable> completionHandler, final CloseReason closeReason)
Overrides org.
|
| public String |
| connectHandlerRef | back to summary |
|---|---|
| private AtomicReference<TCPNIOConnection. | |
| localSocketAddressHolder | back to summary |
|---|---|
| pack-priv Holder<SocketAddress> localSocketAddressHolder | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| peerSocketAddressHolder | back to summary |
|---|---|
| pack-priv Holder<SocketAddress> peerSocketAddressHolder | |
| readBufferSize | back to summary |
|---|---|
| private int readBufferSize | |
| writeBufferSize | back to summary |
|---|---|
| private int writeBufferSize | |
| TCPNIOConnection | back to summary |
|---|---|
| public TCPNIOConnection(TCPNIOTransport transport, SelectableChannel channel) | |
| canWrite | back to summary |
|---|---|
| public boolean canWrite() Implements org.
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(int length) Implements org. Deprecated
| |
| checkConnectFailed | back to summary |
|---|---|
| protected final void checkConnectFailed(Throwable failure) Method will be called in order to check if failure happened before | |
| enableInitialOpRead | back to summary |
|---|---|
| protected void enableInitialOpRead() throws IOException Overrides org. Doc from org. Enables OP_READ if it has never been enabled before.
| |
| getLocalAddress | back to summary |
|---|---|
| public SocketAddress getLocalAddress() Implements org. Returns the local address of this Connection, or null if it is unconnected.
| |
| getPeerAddress | back to summary |
|---|---|
| public SocketAddress getPeerAddress() Implements org. Returns the address of the endpoint this Connection is connected to, or null if it is unconnected.
| |
| getReadBufferSize | back to summary |
|---|---|
| public int getReadBufferSize() Implements org. Doc from org. Get the default size of
| |
| getWriteBufferSize | back to summary |
|---|---|
| public int getWriteBufferSize() Implements org. Doc from org. Get the default size of
| |
| notifyCanWrite | back to summary |
|---|---|
| public void notifyCanWrite(final WriteHandler writeHandler) Implements org. Doc from org. Instructs the
| |
| notifyCanWrite | back to summary |
|---|---|
| public void notifyCanWrite(WriteHandler handler, int length) Implements org. Doc from org. Deprecated
Instructs the
| |
| notifyReady | back to summary |
|---|---|
| protected boolean notifyReady() | |
| onConnect | back to summary |
|---|---|
| protected final void onConnect() throws IOException Method will be called, when the connection gets connected. | |
| onRead | back to summary |
|---|---|
| protected final void onRead(Buffer data, int size) Method will be called, when some data was read on the connection | |
| onWrite | back to summary |
|---|---|
| protected final void onWrite(Buffer data, long size) Method will be called, when some data was written on the connection | |
| preClose | back to summary |
|---|---|
| protected void preClose() Overrides org.
| |
| resetProperties | back to summary |
|---|---|
| protected void resetProperties() | |
| setConnectResultHandler | back to summary |
|---|---|
| protected final void setConnectResultHandler(final TCPNIOConnection. | |
| setReadBufferSize | back to summary |
|---|---|
| public void setReadBufferSize(final int readBufferSize) Implements org. Doc from org. Set the default size of
| |
| setSelectionKey | back to summary |
|---|---|
| protected void setSelectionKey(SelectionKey selectionKey) Overrides org.
| |
| setSelectorRunner | back to summary |
|---|---|
| protected void setSelectorRunner(SelectorRunner selectorRunner) Overrides org.
| |
| setWriteBufferSize | back to summary |
|---|---|
| public void setWriteBufferSize(int writeBufferSize) Implements org. Doc from org. Set the default size of
| |
| terminate0 | back to summary |
|---|---|
| protected void terminate0(final CompletionHandler<Closeable> completionHandler, final CloseReason closeReason) Overrides org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| connected | back to summary |
|---|---|
| public void connected() throws IOException | |
| failed | back to summary |
|---|---|
| public void failed(final Throwable t) | |