org.apache.geronimo.clustering
Interface SessionListener


public interface SessionListener

Callback listener for inbound and outbound Session migration.

A Session is preemptively moved between its associated set of SessionManagers. For instance, when a ClusteredInvocation for a given Session is invoked on a Node where the local SessionManager, RequestingSM, does not own the targeted Session, the SessionManager owning the Session, OwningSM, the Session may be moved from OwningSM to RequestingSM. OwningSM, prior to relinquish the Session, executes notifyOutboundSessionMigration and provides the Session under migration. RequestingRM, after having acquired the Session ownership, executes notifyInboundSessionMigration and provides the Session under migration.

The typical usage of these migration callbacks are to allow a wrapping SessionManager, e.g. an HTTPSession manager, to perform bookkeeping operations.


Method Summary
 void notifyInboundSessionMigration(Session session)
          Calls when the ownership of the provided Session is acquired by the SessionManager to which this listener is attached.
 void notifyOutboundSessionMigration(Session session)
          Calls when the ownership of the provided Session is relinquished to another SessionManager.
 void notifySessionDestruction(Session session)
          Calls when a Session is destroyed.
 

Method Detail

notifyInboundSessionMigration

void notifyInboundSessionMigration(Session session)
Calls when the ownership of the provided Session is acquired by the SessionManager to which this listener is attached.

Parameters:
session - New Session now owned by the attached SessionManager.

notifyOutboundSessionMigration

void notifyOutboundSessionMigration(Session session)
Calls when the ownership of the provided Session is relinquished to another SessionManager.

Parameters:
session - Session now owned by another SessionManager.

notifySessionDestruction

void notifySessionDestruction(Session session)
Calls when a Session is destroyed.

Parameters:
session - Destroyed session.


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.