public final class VmPipeAcceptor extends AbstractIoAcceptor
IoHandler to the specified
VmPipeAddress.AbstractIoAcceptor.AcceptorOperationFutureAbstractIoService.ServiceOperationFuturebindLockdisposalLock, sessionConfig| 构造器和说明 |
|---|
VmPipeAcceptor()
Creates a new instance.
|
VmPipeAcceptor(java.util.concurrent.Executor executor)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.util.Set<java.net.SocketAddress> |
bindInternal(java.util.List<? extends java.net.SocketAddress> localAddresses)
Starts the acceptor, and register the given addresses
|
protected void |
dispose0()
Implement this method to release any acquired resources.
|
VmPipeAddress |
getDefaultLocalAddress()
Returns the default local address to bind when no argument is specified
in
IoAcceptor.bind() method. |
VmPipeAddress |
getLocalAddress()
Returns the local address which is bound currently.
|
VmPipeSessionConfig |
getSessionConfig() |
TransportMetadata |
getTransportMetadata() |
IoSession |
newSession(java.net.SocketAddress remoteAddress,
java.net.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. |
void |
setDefaultLocalAddress(VmPipeAddress localAddress)
Sets the local Address for this acceptor
|
protected void |
unbind0(java.util.List<? extends java.net.SocketAddress> localAddresses)
Implement this method to perform the actual unbind operation.
|
bind, bind, bind, bind, bind, getDefaultLocalAddresses, getLocalAddresses, isCloseOnDeactivation, setCloseOnDeactivation, setDefaultLocalAddress, setDefaultLocalAddresses, setDefaultLocalAddresses, setDefaultLocalAddresses, toString, unbind, unbind, unbind, unbindaddListener, broadcast, dispose, dispose, executeWorker, executeWorker, finishSessionInitialization0, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getListeners, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, initSession, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, broadcast, dispose, dispose, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactorypublic VmPipeAcceptor()
public VmPipeAcceptor(java.util.concurrent.Executor executor)
executor - The executor to usepublic TransportMetadata getTransportMetadata()
TransportMetadata that this service runs on.public VmPipeSessionConfig getSessionConfig()
IoSessions
created by this service.public VmPipeAddress getLocalAddress()
getLocalAddress 在接口中 IoAcceptorgetLocalAddress 在类中 AbstractIoAcceptorpublic VmPipeAddress getDefaultLocalAddress()
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).getDefaultLocalAddress 在接口中 IoAcceptorgetDefaultLocalAddress 在类中 AbstractIoAcceptorpublic void setDefaultLocalAddress(VmPipeAddress localAddress)
localAddress - The local address to useprotected void dispose0()
throws java.lang.Exception
AbstractIoService.dispose().dispose0 在类中 AbstractIoServicejava.lang.Exception - If the dispose failedprotected java.util.Set<java.net.SocketAddress> bindInternal(java.util.List<? extends java.net.SocketAddress> localAddresses)
throws java.io.IOException
bindInternal 在类中 AbstractIoAcceptorlocalAddresses - The address to bind toSet of the local addresses which is bound actuallyjava.io.IOExceptionprotected void unbind0(java.util.List<? extends java.net.SocketAddress> localAddresses)
AbstractIoAcceptorunbind0 在类中 AbstractIoAcceptorlocalAddresses - The address to unbind frompublic IoSession newSession(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)
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.
remoteAddress - The remote address bound to the servicelocalAddress - The local address the session will be bound to