org.apache.mina.common
Interface IoService
- IoAcceptor, IoConnector
- BaseIoAcceptor, BaseIoConnector, BaseIoService, DatagramAcceptor, DatagramAcceptorDelegate, DatagramConnector, DatagramConnectorDelegate, DelegatedIoAcceptor, DelegatedIoConnector, SocketAcceptor, SocketConnector, VmPipeAcceptor, VmPipeConnector
public interface IoService
getDefaultConfig
public IoServiceConfig getDefaultConfig()
Returns the default configuration which is used when you didn't specify
any configuration.
getManagedServiceAddresses
public Set getManagedServiceAddresses()
Returns all
SocketAddress
es this service is managing.
If this service is an
IoAcceptor
, a set of bind addresses will
be returned. If this service is an
IoConnector
, a set of remote
addresses will be returned.
getManagedSessions
public Set getManagedSessions(SocketAddress serviceAddress)
Returns all sessions with the specified remote or local address,
which are currently managed by this service.
IoAcceptor
will assume the specified
address is a local
address, and
IoConnector
will assume it's a remote address.
serviceAddress
- the address to return all sessions for.
- the sessions. An empty collection if there's no session.
isManaged
public boolean isManaged(SocketAddress serviceAddress)
Returns
true if this service is managing the specified
serviceAddress.
If this service is an
IoAcceptor
,
serviceAddress is a bind address.
If this service is an
IoConnector
,
serviceAddress is a remote address.