public abstract class AbstractPollingIoAcceptor<T extends AbstractIoSession,H> extends AbstractIoAcceptor
AbstractIoAcceptor.AcceptorOperationFuture
AbstractIoService.ServiceOperationFuture
bindLock
Modifier | Constructor and Description |
---|---|
protected |
AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
java.lang.Class<? extends IoProcessor<T>> processorClass)
Create an acceptor with a single processing thread using a NewThreadExecutor
|
protected |
AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
java.lang.Class<? extends IoProcessor<T>> processorClass,
int processorCount) |
protected |
AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
java.util.concurrent.Executor executor,
IoProcessor<T> processor) |
protected |
AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
IoProcessor<T> processor) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
accept(IoProcessor<T> processor,
H handle) |
protected java.util.Set<java.net.SocketAddress> |
bind0(java.util.List<? extends java.net.SocketAddress> localAddresses)
Implement this method to perform the actual bind operation.
|
protected abstract void |
close(H handle) |
protected abstract void |
destroy() |
protected IoFuture |
dispose0()
Implement this method to release any acquired resources.
|
protected abstract void |
init() |
protected abstract java.net.SocketAddress |
localAddress(H handle) |
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. |
protected abstract H |
open(java.net.SocketAddress localAddress) |
protected abstract boolean |
select() |
protected abstract java.util.Iterator<H> |
selectedHandles() |
protected void |
unbind0(java.util.List<? extends java.net.SocketAddress> localAddresses)
Implement this method to perform the actual unbind operation.
|
protected abstract void |
wakeup() |
bind, bind, bind, bind, getDefaultLocalAddress, getDefaultLocalAddresses, getLocalAddress, getLocalAddresses, isCloseOnDeactivation, setCloseOnDeactivation, setDefaultLocalAddress, setDefaultLocalAddresses, setDefaultLocalAddresses, setDefaultLocalAddresses, toString, unbind, unbind, unbind, unbind
addListener, broadcast, decreaseScheduledWriteMessages, dispose, finishSessionInitialization, finishSessionInitialization0, getActivationTime, getBothIdleCount, getBothIdleTime, getBothIdleTimeInMillis, getCumulativeManagedSessionCount, getFilterChain, getFilterChainBuilder, getHandler, getIdleCount, getIdleTime, getIdleTimeInMillis, getLargestManagedSessionCount, getLargestReadBytesThroughput, getLargestReadMessagesThroughput, getLargestWrittenBytesThroughput, getLargestWrittenMessagesThroughput, getLastBothIdleTime, getLastIdleTime, getLastIoTime, getLastReaderIdleTime, getLastReadTime, getLastWriterIdleTime, getLastWriteTime, getListeners, getManagedSessionCount, getManagedSessions, getReadBytes, getReadBytesThroughput, getReaderIdleCount, getReaderIdleTime, getReaderIdleTimeInMillis, getReadMessages, getReadMessagesThroughput, getScheduledWriteBytes, getScheduledWriteMessages, getSessionConfig, getSessionDataStructureFactory, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleCount, getWriterIdleTime, getWriterIdleTimeInMillis, getWrittenBytes, getWrittenBytesThroughput, getWrittenMessages, getWrittenMessagesThroughput, increaseReadBytes, increaseReadMessages, increaseScheduledWriteBytes, increaseScheduledWriteMessages, increaseWrittenBytes, increaseWrittenMessages, isActive, isBothIdle, isDisposed, isDisposing, isIdle, isReaderIdle, isWriterIdle, notifyIdleness, removeListener, setBothIdleTime, setFilterChainBuilder, setHandler, setIdleTime, setLastReadTime, setLastWriteTime, setReaderIdleTime, setSessionDataStructureFactory, setThroughputCalculationInterval, setWriterIdleTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, broadcast, dispose, getActivationTime, getBothIdleCount, getBothIdleTime, getBothIdleTimeInMillis, getCumulativeManagedSessionCount, getFilterChain, getFilterChainBuilder, getHandler, getIdleCount, getIdleTime, getIdleTimeInMillis, getLargestManagedSessionCount, getLargestReadBytesThroughput, getLargestReadMessagesThroughput, getLargestWrittenBytesThroughput, getLargestWrittenMessagesThroughput, getLastBothIdleTime, getLastIdleTime, getLastIoTime, getLastReaderIdleTime, getLastReadTime, getLastWriterIdleTime, getLastWriteTime, getManagedSessionCount, getManagedSessions, getReadBytes, getReadBytesThroughput, getReaderIdleCount, getReaderIdleTime, getReaderIdleTimeInMillis, getReadMessages, getReadMessagesThroughput, getScheduledWriteBytes, getScheduledWriteMessages, getSessionConfig, getSessionDataStructureFactory, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getTransportMetadata, getWriterIdleCount, getWriterIdleTime, getWriterIdleTimeInMillis, getWrittenBytes, getWrittenBytesThroughput, getWrittenMessages, getWrittenMessagesThroughput, isActive, isBothIdle, isDisposed, isDisposing, isIdle, isReaderIdle, isWriterIdle, removeListener, setBothIdleTime, setFilterChainBuilder, setHandler, setIdleTime, setReaderIdleTime, setSessionDataStructureFactory, setThroughputCalculationInterval, setWriterIdleTime
protected AbstractPollingIoAcceptor(IoSessionConfig sessionConfig, java.lang.Class<? extends IoProcessor<T>> processorClass)
protected AbstractPollingIoAcceptor(IoSessionConfig sessionConfig, java.lang.Class<? extends IoProcessor<T>> processorClass, int processorCount)
protected AbstractPollingIoAcceptor(IoSessionConfig sessionConfig, IoProcessor<T> processor)
protected AbstractPollingIoAcceptor(IoSessionConfig sessionConfig, java.util.concurrent.Executor executor, IoProcessor<T> processor)
protected abstract void init() throws java.lang.Exception
java.lang.Exception
protected abstract void destroy() throws java.lang.Exception
java.lang.Exception
protected abstract boolean select() throws java.lang.Exception
java.lang.Exception
protected abstract void wakeup()
protected abstract java.util.Iterator<H> selectedHandles()
protected abstract H open(java.net.SocketAddress localAddress) throws java.lang.Exception
java.lang.Exception
protected abstract java.net.SocketAddress localAddress(H handle) throws java.lang.Exception
java.lang.Exception
protected abstract T accept(IoProcessor<T> processor, H handle) throws java.lang.Exception
java.lang.Exception
protected abstract void close(H handle) throws java.lang.Exception
java.lang.Exception
protected IoFuture dispose0() throws java.lang.Exception
AbstractIoService
AbstractIoService.dispose()
.dispose0
in class AbstractIoService
java.lang.Exception
protected final java.util.Set<java.net.SocketAddress> bind0(java.util.List<? extends java.net.SocketAddress> localAddresses) throws java.lang.Exception
AbstractIoAcceptor
bind0
in class AbstractIoAcceptor
Set
of the local addresses which is bound actuallyjava.lang.Exception
protected final void unbind0(java.util.List<? extends java.net.SocketAddress> localAddresses) throws java.lang.Exception
AbstractIoAcceptor
unbind0
in class AbstractIoAcceptor
java.lang.Exception
public final IoSession newSession(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)
IoAcceptor
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.
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.