Java Doc for IoAcceptor.java in » Net » mina-2.0.0-M1 » org » apache » mina » common » Java Source Code / Java DocumentationJava Source Code and Java Documentation
You should bind to the desired socket address to accept incoming
connections, and then events for incoming connections will be sent to
the specified default
IoHandler .
Threads accept incoming connections start automatically when
IoAcceptor.bind() is invoked, and stop when
IoAcceptor.unbind() is invoked.
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 601229 $, $Date: 2007-12-05 00:13:18 -0700 (Wed, 05 Dec 2007) $
Method Summary
void
bind() Binds to the default local address(es) and start to accept incoming
connections.
void
bind(SocketAddress localAddress) Binds to the specified local address and start to accept incoming
connections.
void
bind(SocketAddress firstLocalAddress, SocketAddress... otherLocalAddresses) Binds to the specified local addresses and start to accept incoming
connections.
void
bind(Iterable<? extends SocketAddress> localAddresses) Binds to the specified local addresses and start to accept incoming
connections.
newSession(SocketAddress remoteAddress, SocketAddress localAddress) (Optional) Returns an
IoSession that is bound to the specified
localAddress and the specified remoteAddress which
reuses the local address that is already bound by this service.
This operation is optional.
void
setCloseOnDeactivation(boolean closeOnDeactivation) Sets whether all client sessions are closed when this acceptor unbinds
from all the related local addresses (i.e.
unbind() Unbinds from all local addresses that this service is bound to and stops
to accept incoming connections.
void
unbind(SocketAddress localAddress) Unbinds from the specified local address and stop to accept incoming
connections.
void
unbind(SocketAddress firstLocalAddress, SocketAddress... otherLocalAddresses) Unbinds from the specified local addresses and stop to accept incoming
connections.
void
unbind(Iterable<? extends SocketAddress> localAddresses) Unbinds from the specified local addresses and stop to accept incoming
connections.
Returns the default local address to bind when no argument is specified
in
IoAcceptor.bind() method. Please note that the default will not be
used if any local address is specified. If more than one address are
set, only one of them will be returned, but it's not necessarily the
firstly specified address in
IoAcceptor.setDefaultLocalAddresses(List) .
Returns a
List of the default local addresses to bind when no
argument is specified in
IoAcceptor.bind() method. Please note that the
default will not be used if any local address is specified.
Returns the local address which is bound currently. If more than one
address are bound, only one of them will be returned, but it's not
necessarily the firstly bound address.
Returns true if and only if all clients are closed when this
acceptor unbinds from all the related local address (i.e. when the
service is deactivated).
(Optional) Returns an
IoSession that is bound to the specified
localAddress and the specified remoteAddress which
reuses the local address that is already bound by this service.
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.
throws: UnsupportedOperationException - if this operation is not supported throws: IllegalStateException - if this service is not running. throws: IllegalArgumentException - if this service is not bound to thespecified localAddress.
Sets whether all client sessions are closed when this acceptor unbinds
from all the related local addresses (i.e. when the service is
deactivated). The default value is true.
Sets the default local address to bind when no argument is specified in
IoAcceptor.bind() method. Please note that the default will not be used
if any local address is specified.
Sets the default local addresses to bind when no argument is specified
in
IoAcceptor.bind() method. Please note that the default will not be
used if any local address is specified.
Sets the default local addresses to bind when no argument is specified
in
IoAcceptor.bind() method. Please note that the default will not be
used if any local address is specified.
Sets the default local addresses to bind when no argument is specified
in
IoAcceptor.bind() method. Please note that the default will not be
used if any local address is specified.
Unbinds from all local addresses that this service is bound to and stops
to accept incoming connections. All managed connections will be closed
if
IoAcceptor.setCloseOnDeactivation(boolean) disconnectOnUnbind property
is true. This method returns silently if no local address is
bound yet.
Unbinds from the specified local address and stop to accept incoming
connections. All managed connections will be closed if
IoAcceptor.setCloseOnDeactivation(boolean) disconnectOnUnbind property is
true. This method returns silently if the default local
address is not bound yet.
Unbinds from the specified local addresses and stop to accept incoming
connections. All managed connections will be closed if
IoAcceptor.setCloseOnDeactivation(boolean) disconnectOnUnbind property is
true. This method returns silently if the default local
addresses are not bound yet.
Unbinds from the specified local addresses and stop to accept incoming
connections. All managed connections will be closed if
IoAcceptor.setCloseOnDeactivation(boolean) disconnectOnUnbind property is
true. This method returns silently if the default local
addresses are not bound yet.