Package org.apache.mina.common.support
Class BaseIoAcceptor
java.lang.Object
org.apache.mina.common.support.BaseIoService
org.apache.mina.common.support.BaseIoAcceptor
- All Implemented Interfaces:
IoAcceptor,IoService
- Direct Known Subclasses:
DatagramAcceptorDelegate,SocketAcceptor,VmPipeAcceptor
A base implementation of
IoAcceptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(SocketAddress address, IoHandler handler) Binds to the specifiedaddressand handles incoming connections with the specifiedhandler.newSession(SocketAddress remoteAddress, SocketAddress localAddress) (Optional) Returns anIoSessionthat is bound to the specified localAddress and remoteAddress which reuses the localAddress that is already bound byIoAcceptorviaIoAcceptor.bind(SocketAddress, IoHandler).Methods inherited from class org.apache.mina.common.support.BaseIoService
addListener, getFilterChain, getFilterChainBuilder, getListeners, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.mina.common.IoAcceptor
bind, unbind, unbindAllMethods inherited from interface org.apache.mina.common.IoService
addListener, getDefaultConfig, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder
-
Constructor Details
-
BaseIoAcceptor
protected BaseIoAcceptor()
-
-
Method Details
-
bind
Description copied from interface:IoAcceptorBinds to the specifiedaddressand handles incoming connections with the specifiedhandler.- Specified by:
bindin interfaceIoAcceptor- Throws:
IOException- if failed to bind
-
newSession
Description copied from interface:IoAcceptor(Optional) Returns anIoSessionthat is bound to the specified localAddress and remoteAddress which reuses the localAddress that is already bound byIoAcceptorviaIoAcceptor.bind(SocketAddress, IoHandler).This operation is optional. Please throw
UnsupportedOperationExceptionif the transport type doesn't support this operation. This operation is usually implemented for connectionless transport types.- Specified by:
newSessionin interfaceIoAcceptor
-