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<SocketAddress>, MonitoringAware<ConnectionProbe>, Readable<SocketAddress>, Writable<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, closeTypeFlag, connectCloseSemaphor, isBlocking, isStandalone, maxAsyncWriteQueueSize, monitoringConfig, NOTIFICATION_CLOSED_COMPLETE, NOTIFICATION_INITIALIZED, processor, processorSelector, readBufferSize, readTimeoutMillis, selectionKey, selectorRunner, transport, writeBufferSize, writeTimeoutMillis, zeroByteReadCount |
| Methods inherited from class org.glassfish.grizzly.nio.transport.UDPNIOConnection |
getLocalAddress, getPeerAddress, isConnected, notifyReady, onConnect, onRead, onWrite, resetProperties, setReadBufferSize, setSelectionKey, setSelectorRunner, setWriteBufferSize, toString |
| Methods inherited from class org.glassfish.grizzly.nio.NIOConnection |
addCloseListener, attachToSelectorRunner, checkEmptyRead, close, close0, closeSilently, configureBlocking, configureStandalone, detachSelectorRunner, disableIOEvent, enableIOEvent, getAsyncReadQueue, getAsyncWriteQueue, getAttributes, getChannel, getMaxAsyncWriteQueueSize, getMonitoringConfig, getReadBufferSize, getReadTimeout, getSelectionKey, getSelectorRunner, getTransport, getWriteBufferSize, getWriteTimeout, isBlocking, isOpen, isStandalone, notifyConnectionError, notifyIOEventDisabled, notifyIOEventEnabled, notifyIOEventReady, notifyProbesAccept, notifyProbesBind, notifyProbesClose, notifyProbesConnect, notifyProbesError, notifyProbesRead, notifyProbesWrite, obtainProcessor, obtainProcessorState, read, read, removeCloseListener, setChannel, setMaxAsyncWriteQueueSize, setProcessor, setProcessorSelector, setReadTimeout, setWriteTimeout, simulateIOEvent, write, write, write, write |
UDPNIOServerConnection
public UDPNIOServerConnection(UDPNIOTransport transport,
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<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<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.
register
public void register()
throws IOException
- Throws:
IOException
close
public void close(CompletionHandler<Connection> completionHandler)
- Description copied from interface:
Connection
- Close the
Connection
- Specified by:
close in interface Closeable<Connection>- Specified by:
close in interface Connection<SocketAddress>- Overrides:
close in class NIOConnection
- Parameters:
completionHandler - CompletionHandler to be called, when
the connection is closed.
unbind
public void unbind(CompletionHandler<Connection> completionHandler)
preClose
protected void preClose()
- Overrides:
preClose in class NIOConnection
Copyright © 2012 Oracle Corporation. All Rights Reserved.