|
TopoWeb Commons API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for creating and/or recycling Session objects.
This recycling does not concern itself with a session's underlying socket;
rather, besides the socket itself, the resources used to maintain the
conversational state in a Session instance may be worth
recycling.
Additionally, this interface can be considered a factory interface for
Session instances.
Session| Method Summary | |
void |
freeSession(Session session)
Frees the given session. |
Session |
getSession(java.nio.channels.SocketChannel channel)
Returns a Session instance using the specified
socket channel. |
| Method Detail |
public Session getSession(java.nio.channels.SocketChannel channel)
Session instance using the specified
socket channel. The returned instance may be from a
pool of recyclable Session instance.
channel - the socket channel associated with returned
instance
Session instance using the given
socket channelpublic void freeSession(Session session)
session. A freed Session
instance may not be used again, unless it happens to be returned by
the getSession method of this
interface.
Note that a SessionPool instance is not supposed to
manage a session's underlying socket (such as closing it); the session's
underlying socket is supposed to be closed elsewhere.
session - the Session to be freed
|
TopoWeb Commons API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||