|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.nio.NIOConnection
org.glassfish.grizzly.nio.transport.TCPNIOConnection
public class TCPNIOConnection
Connection implementation
for the TCPNIOTransport
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.glassfish.grizzly.Connection |
|---|
Connection.CloseListener |
| Field Summary |
|---|
| Fields inherited from class org.glassfish.grizzly.nio.NIOConnection |
|---|
asyncReadQueue, asyncWriteQueue, attributes, channel, isBlocking, isClosed, isStandalone, monitoringConfig, processor, processorSelector, readBufferSize, readTimeoutMillis, selectionKey, selectorRunner, transport, writeBufferSize, writeTimeoutMillis, zeroByteReadCount |
| Constructor Summary | |
|---|---|
TCPNIOConnection(TCPNIOTransport transport,
java.nio.channels.SelectableChannel channel)
|
|
| Method Summary | |
|---|---|
protected void |
checkConnectFailed(java.lang.Throwable failure)
Method will be called in order to check if failure happened before Connection was reported as connected. |
java.net.SocketAddress |
getLocalAddress()
Returns the local address of this Connection, or null if it is unconnected. |
java.net.SocketAddress |
getPeerAddress()
Returns the address of the endpoint this Connection is connected to, or null if it is unconnected. |
protected void |
onConnect()
Method will be called, when the connection gets connected. |
protected void |
onRead(Buffer data,
int size)
Method will be called, when some data was read on the connection |
protected void |
onWrite(Buffer data,
int size)
Method will be called, when some data was written on the connection |
protected void |
preClose()
|
protected void |
resetProperties()
|
protected void |
setConnectCompletionHandler(CompletionHandler<Connection> connectHandler)
|
void |
setReadBufferSize(int readBufferSize)
Set the default size of Buffers, which will be allocated for
reading data from Connection. |
protected void |
setSelectionKey(java.nio.channels.SelectionKey selectionKey)
|
protected void |
setSelectorRunner(SelectorRunner selectorRunner)
|
void |
setWriteBufferSize(int writeBufferSize)
Set the default size of Buffers, which will be allocated for
writing data to Connection. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TCPNIOConnection(TCPNIOTransport transport,
java.nio.channels.SelectableChannel channel)
| Method Detail |
|---|
protected void setSelectionKey(java.nio.channels.SelectionKey selectionKey)
setSelectionKey in class NIOConnectionprotected void setSelectorRunner(SelectorRunner selectorRunner)
setSelectorRunner in class NIOConnectionprotected void preClose()
preClose in class NIOConnectionpublic java.net.SocketAddress getPeerAddress()
public java.net.SocketAddress getLocalAddress()
protected final void resetProperties()
public void setReadBufferSize(int readBufferSize)
ConnectionBuffers, which will be allocated for
reading data from Connection.
setReadBufferSize in interface Connection<java.net.SocketAddress>setReadBufferSize in class NIOConnectionreadBufferSize - 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<java.net.SocketAddress>setWriteBufferSize in class NIOConnectionwriteBufferSize - the default size of Buffers, which will
be allocated for writing data to Connection.protected final void setConnectCompletionHandler(CompletionHandler<Connection> connectHandler)
protected final void onConnect()
throws java.io.IOException
java.io.IOExceptionprotected final void checkConnectFailed(java.lang.Throwable failure)
Connection was reported as connected.
java.io.IOException
protected final void onRead(Buffer data,
int size)
protected final void onWrite(Buffer data,
int size)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||