public abstract class BaseIoAcceptor extends BaseIoService implements IoAcceptor
IoAcceptor
.限定符 | 构造器和说明 |
---|---|
protected |
BaseIoAcceptor() |
限定符和类型 | 方法和说明 |
---|---|
void |
bind(java.net.SocketAddress address,
IoHandler handler)
Binds to the specified
address and handles incoming
connections with the specified handler . |
IoSession |
newSession(java.net.SocketAddress remoteAddress,
java.net.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) . |
addListener, getFilterChain, getFilterChainBuilder, getListeners, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bind, unbind, unbindAll
addListener, getDefaultConfig, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder
public void bind(java.net.SocketAddress address, IoHandler handler) throws java.io.IOException
IoAcceptor
address
and handles incoming
connections with the specified handler
.bind
在接口中 IoAcceptor
java.io.IOException
- if failed to bindpublic IoSession newSession(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)
IoAcceptor
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
在接口中 IoAcceptor