Class DatagramConnectorDelegate
java.lang.Object
org.apache.mina.common.support.BaseIoService
org.apache.mina.common.support.BaseIoConnector
org.apache.mina.transport.socket.nio.support.DatagramConnectorDelegate
- All Implemented Interfaces:
IoConnector,IoService
IoConnector for datagram transport (UDP/IP).-
Constructor Summary
ConstructorsConstructorDescriptionDatagramConnectorDelegate(IoConnector wrapper, Executor executor) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) connect(SocketAddress address, SocketAddress localAddress, IoHandler handler, IoServiceConfig config) Connects to the specifiedaddress.connect(SocketAddress address, IoHandler handler, IoServiceConfig config) Connects to the specifiedaddress.voidflushSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) Returns the default configuration which is used when you didn't specify any configuration.voidsetDefaultConfig(DatagramConnectorConfig defaultConfig) Sets the config this connector will use by default.voidupdateTrafficMask(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) Methods inherited from class org.apache.mina.common.support.BaseIoConnector
connect, connectMethods inherited from class org.apache.mina.common.support.BaseIoService
addListener, getFilterChain, getFilterChainBuilder, getListeners, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.mina.common.IoService
addListener, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder
-
Constructor Details
-
DatagramConnectorDelegate
Creates a new instance.
-
-
Method Details
-
connect
Description copied from interface:IoConnectorConnects to the specifiedaddress. If communication starts successfully, events are fired to the specifiedhandler.- Specified by:
connectin interfaceIoConnectorconfig- the configuration- Returns:
ConnectFuturethat will tell the result of the connection attempt
-
connect
public ConnectFuture connect(SocketAddress address, SocketAddress localAddress, IoHandler handler, IoServiceConfig config) Description copied from interface:IoConnectorConnects to the specifiedaddress. If communication starts successfully, events are fired to the specifiedhandler.- Specified by:
connectin interfaceIoConnectorconfig- the configuration- Returns:
ConnectFuturethat will tell the result of the connection attempt
-
getDefaultConfig
Description copied from interface:IoServiceReturns the default configuration which is used when you didn't specify any configuration.- Specified by:
getDefaultConfigin interfaceIoService
-
setDefaultConfig
Sets the config this connector will use by default.- Parameters:
defaultConfig- the default config.- Throws:
NullPointerException- if the specified value isnull.
-
closeSession
public void closeSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) -
flushSession
public void flushSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) -
updateTrafficMask
public void updateTrafficMask(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
-