org.apache.mina.core.session
Class ExpiringSessionRecycler
java.lang.Object
org.apache.mina.core.session.ExpiringSessionRecycler
- All Implemented Interfaces:
- IoSessionRecycler
public class ExpiringSessionRecycler
- extends Object
- implements IoSessionRecycler
An IoSessionRecycler
with sessions that time out on inactivity.
TODO Document me.
- Version:
- $Rev: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (jeu, 26 jun 2008) $
- Author:
- The Apache MINA Project (dev@mina.apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpiringSessionRecycler
public ExpiringSessionRecycler()
ExpiringSessionRecycler
public ExpiringSessionRecycler(int timeToLive)
ExpiringSessionRecycler
public ExpiringSessionRecycler(int timeToLive,
int expirationInterval)
put
public void put(IoSession session)
- Description copied from interface:
IoSessionRecycler
- Called when the underlying transport creates or writes a new
IoSession
.
- Specified by:
put
in interface IoSessionRecycler
- Parameters:
session
- the new IoSession
.
recycle
public IoSession recycle(SocketAddress localAddress,
SocketAddress remoteAddress)
- Description copied from interface:
IoSessionRecycler
- Attempts to retrieve a recycled
IoSession
.
- Specified by:
recycle
in interface IoSessionRecycler
- Parameters:
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.
- Returns:
- a recycled
IoSession
, or null if one cannot be found.
remove
public void remove(IoSession session)
- Description copied from interface:
IoSessionRecycler
- Called when an
IoSession
is explicitly closed.
- Specified by:
remove
in interface IoSessionRecycler
- Parameters:
session
- the new IoSession
.
stopExpiring
public void stopExpiring()
getExpirationInterval
public int getExpirationInterval()
getTimeToLive
public int getTimeToLive()
setExpirationInterval
public void setExpirationInterval(int expirationInterval)
setTimeToLive
public void setTimeToLive(int timeToLive)
Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.