org.apache.mina.common.support
Class DelegatedIoAcceptor
java.lang.Object
org.apache.mina.common.support.DelegatedIoAcceptor
- IoAcceptor, IoService
public class DelegatedIoAcceptor
extends java.lang.Object
DelegatedIoAcceptor
protected DelegatedIoAcceptor()
Creates a new instance.
bind
public void bind(SocketAddress address,
IoHandler handler)
throws IOException
Binds to the specified address
and handles incoming
connections with the specified handler
.
- bind in interface IoAcceptor
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
init
protected void init(IoAcceptor delegate)
Sets the delegate. This method should be invoked before any operations
is requested.
newSession
public IoSession newSession(SocketAddress remoteAddress,
SocketAddress localAddress)
(Optional) Returns an
IoSession
that is bound to the specified
localAddress and
remoteAddress which reuses
the
localAddress that is already bound by
IoAcceptor
via
IoAcceptor.bind(SocketAddress,IoHandler)
.
This operation is optional. Please throw
UnsupportedOperationException
if the transport type doesn't support this operation. This operation is
usually implemented for connectionless transport types.
- newSession in interface IoAcceptor
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