org.glassfish.grizzly.nio.transport
Class UDPNIOServerConnection
java.lang.Object
org.glassfish.grizzly.nio.NIOConnection
org.glassfish.grizzly.nio.transport.UDPNIOConnection
org.glassfish.grizzly.nio.transport.UDPNIOServerConnection
- All Implemented Interfaces:
- AttributeStorage, Closeable<Connection>, Connection<java.net.SocketAddress>, MonitoringAware<ConnectionProbe>, Readable<java.net.SocketAddress>, Writable<java.net.SocketAddress>
public class UDPNIOServerConnection
- extends UDPNIOConnection
Server Connection implementation
for the UDPNIOTransport
- Author:
- Alexey Stashok
| 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 |
| Methods inherited from class org.glassfish.grizzly.nio.transport.UDPNIOConnection |
getLocalAddress, getPeerAddress, isConnected, onConnect, onRead, onWrite, register, resetProperties, setReadBufferSize, setSelectionKey, setSelectorRunner, setWriteBufferSize, toString |
| Methods inherited from class org.glassfish.grizzly.nio.NIOConnection |
addCloseListener, attachToSelectorRunner, checkEmptyRead, close, configureBlocking, configureStandalone, detachSelectorRunner, disableIOEvent, enableIOEvent, getAsyncReadQueue, getAsyncWriteQueue, getAttributes, getChannel, getMonitoringConfig, getReadBufferSize, getReadTimeout, getSelectionKey, getSelectorRunner, getTransport, getWriteBufferSize, getWriteTimeout, isBlocking, isOpen, isStandalone, notifyConnectionError, notifyIOEventDisabled, notifyIOEventEnabled, notifyIOEventReady, notifyProbesAccept, notifyProbesBind, notifyProbesClose, notifyProbesConnect, notifyProbesError, notifyProbesRead, notifyProbesWrite, obtainProcessor, read, read, removeCloseListener, setChannel, setProcessor, setProcessorSelector, setReadTimeout, setWriteTimeout, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UDPNIOServerConnection
public UDPNIOServerConnection(UDPNIOTransport transport,
java.nio.channels.DatagramChannel channel)
getProcessor
public Processor getProcessor()
- Description copied from interface:
Connection
- Gets the default
Processor, which will process Connection
I/O events.
If Processor is null, - then Transport will try
to get Processor using Connection's
ProcessorSelector.select(IOEvent, Connection). If
ProcessorSelector, associated withthe Connection is also
null - Transport will try to get Processor
using own settings.
- Specified by:
getProcessor in interface Connection<java.net.SocketAddress>- Overrides:
getProcessor in class NIOConnection
- Returns:
- the default
Processor, which will process
Connection I/O events.
getProcessorSelector
public ProcessorSelector getProcessorSelector()
- Description copied from interface:
Connection
- Gets the default
ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null.
- Specified by:
getProcessorSelector in interface Connection<java.net.SocketAddress>- Overrides:
getProcessorSelector in class NIOConnection
- Returns:
- the default
ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null.
close
public GrizzlyFuture<Connection> close(CompletionHandler<Connection> completionHandler)
throws java.io.IOException
- Description copied from interface:
Connection
- Close the
Connection
- Specified by:
close in interface Closeable<Connection>- Specified by:
close in interface Connection<java.net.SocketAddress>- Overrides:
close in class NIOConnection
- Parameters:
completionHandler - CompletionHandler to be called, when
the connection is closed.
- Returns:
Future, which could be checked in case, if close operation
will be run asynchronously
- Throws:
java.io.IOException - if I/O error was detected
during Connection closing.
unbind
public GrizzlyFuture<Connection> unbind(CompletionHandler<Connection> completionHandler)
throws java.io.IOException
- Throws:
java.io.IOException
preClose
protected void preClose()
- Overrides:
preClose in class UDPNIOConnection
Copyright © 2011 Oracle Corpration. All Rights Reserved.