S
- the type of the IoSession
this processor can handlepublic abstract class AbstractPollingConnectionlessIoAcceptor<S extends AbstractIoSession,H> extends AbstractIoAcceptor
IoAcceptor
for datagram transport (UDP/IP).AbstractIoAcceptor.AcceptorOperationFuture
AbstractIoService.ServiceOperationFuture
bindLock
disposalLock
Modifier | Constructor and Description |
---|---|
protected |
AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig)
Creates a new instance.
|
protected |
AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig,
Executor executor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected Set<SocketAddress> |
bindInternal(List<? extends SocketAddress> localAddresses)
Starts the acceptor, and register the given addresses
|
protected abstract void |
close(H handle) |
protected abstract void |
destroy() |
protected void |
dispose0()
Implement this method to release any acquired resources.
|
IoSessionRecycler |
getSessionRecycler() |
protected abstract void |
init() |
protected abstract boolean |
isReadable(H handle) |
protected abstract boolean |
isWritable(H handle) |
protected abstract SocketAddress |
localAddress(H handle) |
protected abstract S |
newSession(IoProcessor<S> processor,
H handle,
SocketAddress remoteAddress) |
IoSession |
newSession(SocketAddress remoteAddress,
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(SocketAddress localAddress) |
protected abstract SocketAddress |
receive(H handle,
IoBuffer buffer) |
protected abstract int |
select() |
protected abstract int |
select(long timeout) |
protected abstract Iterator<H> |
selectedHandles() |
protected abstract int |
send(S session,
IoBuffer buffer,
SocketAddress remoteAddress) |
protected abstract void |
setInterestedInWrite(S session,
boolean interested) |
void |
setSessionRecycler(IoSessionRecycler sessionRecycler) |
protected void |
unbind0(List<? extends 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, dispose, dispose, executeWorker, executeWorker, finishSessionInitialization0, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getListeners, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionConfig, getSessionDataStructureFactory, getStatistics, initSession, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, broadcast, dispose, dispose, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionConfig, getSessionDataStructureFactory, getStatistics, getTransportMetadata, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory
protected AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig)
protected AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig, Executor executor)
protected abstract void wakeup()
protected abstract H open(SocketAddress localAddress) throws Exception
Exception
protected abstract SocketAddress localAddress(H handle) throws Exception
Exception
protected abstract boolean isReadable(H handle)
protected abstract boolean isWritable(H handle)
protected abstract SocketAddress receive(H handle, IoBuffer buffer) throws Exception
Exception
protected abstract int send(S session, IoBuffer buffer, SocketAddress remoteAddress) throws Exception
Exception
protected abstract S newSession(IoProcessor<S> processor, H handle, SocketAddress remoteAddress) throws Exception
Exception
protected abstract void setInterestedInWrite(S session, boolean interested) throws Exception
Exception
protected void dispose0() throws Exception
AbstractIoService.dispose()
.dispose0
in class AbstractIoService
Exception
protected final Set<SocketAddress> bindInternal(List<? extends SocketAddress> localAddresses) throws Exception
bindInternal
in class AbstractIoAcceptor
Set
of the local addresses which is bound actuallyException
protected final void unbind0(List<? extends SocketAddress> localAddresses) throws Exception
unbind0
in class AbstractIoAcceptor
Exception
public final IoSession newSession(SocketAddress remoteAddress, 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.
public final IoSessionRecycler getSessionRecycler()
public final void setSessionRecycler(IoSessionRecycler sessionRecycler)
Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.