|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.AbstractIoService
org.apache.mina.common.AbstractIoAcceptor
org.apache.mina.common.AbstractPollingConnectionlessIoAcceptor<T,H>
public abstract class AbstractPollingConnectionlessIoAcceptor<T extends AbstractIoSession,H>
IoAcceptor
for datagram transport (UDP/IP).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.mina.common.AbstractIoAcceptor |
---|
AbstractIoAcceptor.AcceptorOperationFuture |
Nested classes/interfaces inherited from class org.apache.mina.common.AbstractIoService |
---|
AbstractIoService.ServiceOperationFuture |
Field Summary |
---|
Fields inherited from class org.apache.mina.common.AbstractIoAcceptor |
---|
bindLock |
Constructor Summary | |
---|---|
protected |
AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig)
Creates a new instance. |
protected |
AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig,
Executor executor)
Creates a new instance. |
Method Summary | |
---|---|
protected Set<SocketAddress> |
bind0(List<? extends 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. |
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 T |
newSession(IoProcessor<T> 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 boolean |
select(int timeout)
|
protected abstract Iterator<H> |
selectedHandles()
|
protected abstract int |
send(T session,
IoBuffer buffer,
SocketAddress remoteAddress)
|
protected abstract void |
setInterestedInWrite(T 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()
|
Methods inherited from class org.apache.mina.common.AbstractIoAcceptor |
---|
bind, bind, bind, bind, getDefaultLocalAddress, getDefaultLocalAddresses, getLocalAddress, getLocalAddresses, isCloseOnDeactivation, setCloseOnDeactivation, setDefaultLocalAddress, setDefaultLocalAddresses, setDefaultLocalAddresses, setDefaultLocalAddresses, toString, unbind, unbind, unbind, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig)
protected AbstractPollingConnectionlessIoAcceptor(IoSessionConfig sessionConfig, Executor executor)
Method Detail |
---|
protected abstract void init() throws Exception
Exception
protected abstract void destroy() throws Exception
Exception
protected abstract boolean select(int timeout) throws Exception
Exception
protected abstract void wakeup()
protected abstract Iterator<H> selectedHandles()
protected abstract H open(SocketAddress localAddress) throws Exception
Exception
protected abstract void close(H handle) 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(T session, IoBuffer buffer, SocketAddress remoteAddress) throws Exception
Exception
protected abstract T newSession(IoProcessor<T> processor, H handle, SocketAddress remoteAddress) throws Exception
Exception
protected abstract void setInterestedInWrite(T session, boolean interested) throws Exception
Exception
protected IoFuture dispose0() throws Exception
AbstractIoService
AbstractIoService.dispose()
.
dispose0
in class AbstractIoService
Exception
protected final Set<SocketAddress> bind0(List<? extends SocketAddress> localAddresses) throws Exception
AbstractIoAcceptor
bind0
in class AbstractIoAcceptor
Set
of the local addresses which is bound actually
Exception
protected final void unbind0(List<? extends SocketAddress> localAddresses) throws Exception
AbstractIoAcceptor
unbind0
in class AbstractIoAcceptor
Exception
public final IoSession newSession(SocketAddress remoteAddress, 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.
public final IoSessionRecycler getSessionRecycler()
public final void setSessionRecycler(IoSessionRecycler sessionRecycler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |