|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.mina.common.support.BaseIoService
org.littleshoot.mina.common.support.BaseIoAcceptor
org.littleshoot.mina.transport.socket.nio.support.DatagramAcceptorDelegate
public class DatagramAcceptorDelegate
IoAcceptor for datagram transport (UDP/IP).
| Constructor Summary | |
|---|---|
DatagramAcceptorDelegate(IoAcceptor wrapper,
Executor executor)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
bind(SocketAddress address,
IoHandler handler,
IoServiceConfig config)
Binds to the specified address and handles incoming
connections with the specified handler. |
void |
closeSession(DatagramSessionImpl session)
Requests this processor to close the specified session. |
void |
flushSession(DatagramSessionImpl session)
Requests this processor to flush the write buffer of the specified session. |
DatagramAcceptorConfig |
getDefaultConfig()
Returns the default configuration which is used when you didn't specify any configuration. |
IoServiceListenerSupport |
getListeners()
|
IoSession |
newSession(SocketAddress remoteAddress,
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). |
void |
setDefaultConfig(DatagramAcceptorConfig defaultConfig)
Sets the config this acceptor will use by default. |
void |
unbind(SocketAddress address)
Unbinds from the specified address and disconnects all clients
connected there. |
void |
unbindAll()
Unbinds all addresses which were bound by this acceptor. |
void |
updateTrafficMask(DatagramSessionImpl session)
Requests this processor to update the traffic mask for the specified session. |
| Methods inherited from class org.littleshoot.mina.common.support.BaseIoAcceptor |
|---|
bind |
| Methods inherited from class org.littleshoot.mina.common.support.BaseIoService |
|---|
addListener, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.littleshoot.mina.common.IoAcceptor |
|---|
bind |
| Methods inherited from interface org.littleshoot.mina.common.IoService |
|---|
addListener, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder |
| Constructor Detail |
|---|
public DatagramAcceptorDelegate(IoAcceptor wrapper,
Executor executor)
| Method Detail |
|---|
public void bind(SocketAddress address,
IoHandler handler,
IoServiceConfig config)
throws IOException
IoAcceptoraddress and handles incoming
connections with the specified handler.
bind in interface IoAcceptorconfig - the configuration
IOException - if failed to bindpublic void unbind(SocketAddress address)
IoAcceptoraddress and disconnects all clients
connected there.
unbind in interface IoAcceptorpublic void unbindAll()
IoAcceptor
unbindAll in interface IoAcceptor
public IoSession newSession(SocketAddress remoteAddress,
SocketAddress localAddress)
IoAcceptorIoSession 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 in interface IoAcceptornewSession in class BaseIoAcceptorpublic IoServiceListenerSupport getListeners()
getListeners in class BaseIoServicepublic DatagramAcceptorConfig getDefaultConfig()
IoService
getDefaultConfig in interface IoServicepublic void setDefaultConfig(DatagramAcceptorConfig defaultConfig)
defaultConfig - the default config.
NullPointerException - if the specified value is null.public void flushSession(DatagramSessionImpl session)
public void closeSession(DatagramSessionImpl session)
public void updateTrafficMask(DatagramSessionImpl session)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||