org.apache.mina.transport.socket.nio.support
Class DatagramAcceptorDelegate
- org.apache.mina.transport.socket.nio.support.DatagramService, IoAcceptor, IoService
public class DatagramAcceptorDelegate
implements IoAcceptor, org.apache.mina.transport.socket.nio.support.DatagramService
@Override | IoServiceListenerSupport getListeners()
|
@Override | IoSession newSession(SocketAddress remoteAddress, SocketAddress localAddress)
|
void | bind(SocketAddress address, IoHandler handler, IoServiceConfig config) - Binds to the specified
address and handles incoming
connections with the specified handler .
|
void | closeSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) - Requests this processor to close the specified session.
|
void | flushSession(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) - Requests this processor to flush the write buffer of the specified
session.
|
DatagramAcceptorConfig | getDefaultConfig()
|
void | setDefaultConfig(DatagramAcceptorConfig defaultConfig) - Sets the config this acceptor will use by default.
|
void | unbind(SocketAddress address) - Unbinds from the specified
address and disconnects all clients
connected there.
|
void | unbindAll() - Unbinds all addresses which were bound by this acceptor.
|
void | updateTrafficMask(org.apache.mina.transport.socket.nio.support.DatagramSessionImpl session) - Requests this processor to update the traffic mask for the specified
session.
|
DatagramAcceptorDelegate
public DatagramAcceptorDelegate(IoAcceptor wrapper,
Executor executor)
Creates a new instance.
IoServiceListenerSupport getListeners
public @Override IoServiceListenerSupport getListeners()
IoSession newSession
public @Override IoSession newSession(SocketAddress remoteAddress,
SocketAddress localAddress)
bind
public void bind(SocketAddress address,
IoHandler handler,
IoServiceConfig config)
throws IOException
Binds to the specified address
and handles incoming
connections with the specified handler
.
- bind in interface IoAcceptor
config
- the configuration
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.
- closeSession in interface org.apache.mina.transport.socket.nio.support.DatagramService
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.
- flushSession in interface org.apache.mina.transport.socket.nio.support.DatagramService
setDefaultConfig
public void setDefaultConfig(DatagramAcceptorConfig defaultConfig)
Sets the config this acceptor will use by default.
defaultConfig
- the default config.
unbind
public void unbind(SocketAddress address)
Unbinds from the specified address
and disconnects all clients
connected there.
- unbind in interface IoAcceptor
unbindAll
public void unbindAll()
Unbinds all addresses which were bound by this acceptor.
- unbindAll in interface IoAcceptor
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.
- updateTrafficMask in interface org.apache.mina.transport.socket.nio.support.DatagramService