|
||||||||||
| 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.UDPNIOConnection
public class UDPNIOConnection
Connection implementation
for the UDPNIOTransport
| 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 | |
|---|---|
UDPNIOConnection(UDPNIOTransport transport,
java.nio.channels.DatagramChannel channel)
|
|
| Method Summary | |
|---|---|
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. |
boolean |
isConnected()
|
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()
|
void |
register()
|
protected void |
resetProperties()
|
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 UDPNIOConnection(UDPNIOTransport transport,
java.nio.channels.DatagramChannel channel)
| Method Detail |
|---|
public boolean isConnected()
public void register()
throws java.io.IOException
java.io.IOExceptionprotected 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 onConnect()
throws java.io.IOException
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 | |||||||||