Module org.glassfish.grizzly
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<SocketAddress>
,MonitoringAware<ConnectionProbe>
,OutputSink
,Readable<SocketAddress>
,Writeable<SocketAddress>
Server
Connection
implementation for the UDPNIOTransport
- Author:
- Alexey Stashok
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glassfish.grizzly.Connection
Connection.CloseListener, Connection.CloseType
-
Field Summary
Fields inherited from class org.glassfish.grizzly.nio.NIOConnection
attributes, channel, connectCloseSemaphoreUpdater, isBlocking, isStandalone, maxAsyncWriteQueueSize, monitoringConfig, NOTIFICATION_CLOSED_COMPLETE, NOTIFICATION_INITIALIZED, processor, processorSelector, readTimeoutMillis, selectionKey, selectorRunner, transport, writeTimeoutMillis, zeroByteReadCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
closeGracefully0
(CompletionHandler<Closeable> completionHandler, CloseReason closeReason) Gets the defaultProcessor
, which will processConnection
I/O events.Gets the defaultProcessorSelector
, which will be used to getProcessor
to processConnection
I/O events, in case if thisConnection
'sProcessor
is null.protected void
preClose()
void
register()
protected void
terminate0
(CompletionHandler<Closeable> completionHandler, CloseReason closeReason) void
unbind
(CompletionHandler<Closeable> completionHandler) Methods inherited from class org.glassfish.grizzly.nio.transport.UDPNIOConnection
block, canWrite, canWrite, drop, drop, dropAll, enableInitialOpRead, getLocalAddress, getPeerAddress, getReadBufferSize, getWriteBufferSize, isConnected, join, join, notifyCanWrite, notifyCanWrite, notifyReady, onConnect, onRead, onWrite, resetProperties, setReadBufferSize, setSelectionKey, setSelectorRunner, setWriteBufferSize, toString, unblock
Methods inherited from class org.glassfish.grizzly.nio.NIOConnection
addCloseListener, addCloseListener, assertOpen, attachToSelectorRunner, checkEmptyRead, close, close, closeFuture, closeSilently, closeWithReason, configureBlocking, configureStandalone, detachSelectorRunner, disableIOEvent, doClose, enableIOEvent, executeInEventThread, getAsyncReadQueue, getAsyncWriteQueue, getAttributes, getChannel, getCloseReason, getId, getMaxAsyncWriteQueueSize, getMemoryManager, getMonitoringConfig, getReadTimeout, getSelectionKey, getSelectorRunner, getTransport, getWriteTimeout, isBlocking, isClosed, isOpen, isStandalone, 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, write
-
Constructor Details
-
UDPNIOServerConnection
-
-
Method Details
-
getProcessor
Description copied from interface:Connection
Gets the defaultProcessor
, which will processConnection
I/O events. IfProcessor
is null, - thenTransport
will try to getProcessor
usingConnection
'sProcessorSelector.select(IOEvent, Connection)
. IfProcessorSelector
, associated withtheConnection
is also null -Transport
will try to getProcessor
using own settings.- Specified by:
getProcessor
in interfaceConnection<SocketAddress>
- Overrides:
getProcessor
in classNIOConnection
- Returns:
- the default
Processor
, which will processConnection
I/O events.
-
getProcessorSelector
Description copied from interface:Connection
Gets the defaultProcessorSelector
, which will be used to getProcessor
to processConnection
I/O events, in case if thisConnection
'sProcessor
is null.- Specified by:
getProcessorSelector
in interfaceConnection<SocketAddress>
- Overrides:
getProcessorSelector
in classNIOConnection
- Returns:
- the default
ProcessorSelector
, which will be used to getProcessor
to processConnection
I/O events, in case if thisConnection
'sProcessor
is null.
-
register
- Throws:
IOException
-
closeGracefully0
protected void closeGracefully0(CompletionHandler<Closeable> completionHandler, CloseReason closeReason) - Overrides:
closeGracefully0
in classNIOConnection
-
terminate0
- Overrides:
terminate0
in classNIOConnection
-
unbind
-
preClose
protected void preClose()- Overrides:
preClose
in classNIOConnection
-