org.apache.mina.transport.socket.nio.support
Class DatagramConnectorDelegate

java.lang.Object
  extended by org.apache.mina.common.support.BaseIoService
      extended by org.apache.mina.common.support.BaseIoConnector
          extended by org.apache.mina.transport.socket.nio.support.DatagramConnectorDelegate
All Implemented Interfaces:
IoConnector, IoService

public class DatagramConnectorDelegate
extends BaseIoConnector

IoConnector for datagram transport (UDP/IP).


Constructor Summary
DatagramConnectorDelegate(IoConnector wrapper, java.util.concurrent.Executor executor)
          Creates a new instance.
 
Method Summary
 void closeSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
          Requests this processor to close the specified session.
 ConnectFuture connect(java.net.SocketAddress address, IoHandler handler, IoServiceConfig config)
          Connects to the specified address.
 ConnectFuture connect(java.net.SocketAddress address, java.net.SocketAddress localAddress, IoHandler handler, IoServiceConfig config)
          Connects to the specified address.
 void flushSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
          Requests this processor to flush the write buffer of the specified session.
 DatagramConnectorConfig getDefaultConfig()
          Returns the default configuration which is used when you didn't specify any configuration.
 void setDefaultConfig(DatagramConnectorConfig defaultConfig)
          Sets the config this connector will use by default.
 void updateTrafficMask(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
          Requests this processor to update the traffic mask for the specified session.
 
Methods inherited from class org.apache.mina.common.support.BaseIoConnector
connect, connect
 
Methods inherited from class org.apache.mina.common.support.BaseIoService
addListener, getFilterChain, getFilterChainBuilder, getListeners, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.mina.common.IoService
addListener, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder
 

Constructor Detail

DatagramConnectorDelegate

public DatagramConnectorDelegate(IoConnector wrapper,
                                 java.util.concurrent.Executor executor)
Creates a new instance.

Method Detail

connect

public ConnectFuture connect(java.net.SocketAddress address,
                             IoHandler handler,
                             IoServiceConfig config)
Description copied from interface: IoConnector
Connects to the specified address. If communication starts successfully, events are fired to the specified handler.

Specified by:
connect in interface IoConnector
config - the configuration
Returns:
ConnectFuture that will tell the result of the connection attempt

connect

public ConnectFuture connect(java.net.SocketAddress address,
                             java.net.SocketAddress localAddress,
                             IoHandler handler,
                             IoServiceConfig config)
Description copied from interface: IoConnector
Connects to the specified address. If communication starts successfully, events are fired to the specified handler.

Specified by:
connect in interface IoConnector
config - the configuration
Returns:
ConnectFuture that will tell the result of the connection attempt

getDefaultConfig

public DatagramConnectorConfig getDefaultConfig()
Description copied from interface: IoService
Returns the default configuration which is used when you didn't specify any configuration.

Specified by:
getDefaultConfig in interface IoService

setDefaultConfig

public void setDefaultConfig(DatagramConnectorConfig defaultConfig)
Sets the config this connector will use by default.

Parameters:
defaultConfig - the default config.
Throws:
java.lang.NullPointerException - if the specified value is null.

closeSession

public void closeSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
Requests this processor to close the specified session. This method is invoked by MINA internally.


flushSession

public void flushSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
Requests this processor to flush the write buffer of the specified session. This method is invoked by MINA internally.


updateTrafficMask

public void updateTrafficMask(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session)
Requests this processor to update the traffic mask for the specified session. This method is invoked by MINA internally.