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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseGracefully0(CompletionHandler<Closeable> completionHandler, CloseReason closeReason) Gets the defaultProcessor, which will processConnectionI/O events.Gets the defaultProcessorSelector, which will be used to getProcessorto processConnectionI/O events, in case if thisConnection'sProcessoris null.protected voidpreClose()voidregister()protected voidterminate0(CompletionHandler<Closeable> completionHandler, CloseReason closeReason) voidunbind(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, unblockMethods 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:ConnectionGets the defaultProcessor, which will processConnectionI/O events. IfProcessoris null, - thenTransportwill try to getProcessorusingConnection'sProcessorSelector.select(IOEvent, Connection). IfProcessorSelector, associated withtheConnectionis also null -Transportwill try to getProcessorusing own settings.- Specified by:
getProcessorin interfaceConnection<SocketAddress>- Overrides:
getProcessorin classNIOConnection- Returns:
- the default
Processor, which will processConnectionI/O events.
-
getProcessorSelector
Description copied from interface:ConnectionGets the defaultProcessorSelector, which will be used to getProcessorto processConnectionI/O events, in case if thisConnection'sProcessoris null.- Specified by:
getProcessorSelectorin interfaceConnection<SocketAddress>- Overrides:
getProcessorSelectorin classNIOConnection- Returns:
- the default
ProcessorSelector, which will be used to getProcessorto processConnectionI/O events, in case if thisConnection'sProcessoris null.
-
register
- Throws:
IOException
-
closeGracefully0
protected void closeGracefully0(CompletionHandler<Closeable> completionHandler, CloseReason closeReason) - Overrides:
closeGracefully0in classNIOConnection
-
terminate0
- Overrides:
terminate0in classNIOConnection
-
unbind
-
preClose
protected void preClose()- Overrides:
preClosein classNIOConnection
-