org.apache.mina.common
Interface IoSessionRecycler
- ExpiringSessionRecycler
public interface IoSessionRecycler
A connectionless transport can recycle existing sessions by assigning an
IoSessionRecyler to its
IoServiceConfig
.
NOOP
public static final IoSessionRecycler NOOP
A dummy recycler that doesn't recycle any sessions. Using this recycler will
make all session lifecycle events to be fired for every I/O for all connectionless
sessions.
put
public void put(IoSession session)
Called when the underlying transport creates or writes a new
IoSession
.
recycle
public IoSession recycle(SocketAddress localAddress,
SocketAddress remoteAddress)
localAddress
- the local socket address of the IoSession
the
transport wants to recycle.remoteAddress
- the remote socket address of the IoSession
the
transport wants to recycle.
- a recycled
IoSession
, or null if one cannot be found.
remove
public void remove(IoSession session)
Called when an
IoSession
is explicitly closed.