org.simpleframework.http.session
Interface Observer<T>


public interface Observer<T>

The Observer interface is used to observe the session activity within the session manager. This enables tracking of all sessions created and destroyed by the session manager. Once the session is created the observer start method is invoked and when the session is canceled the cancel method is invoked. Observations allow specialized monitoring.

Author:
Niall Gallagher
See Also:
SessionManager

Method Summary
 void cancel(Session<T> session)
          This method is called after the session has been canceled or expired.
 void create(Session<T> session)
          This method is called after the session has been created but before it is used.
 

Method Detail

create

void create(Session<T> session)
This method is called after the session has been created but before it is used. Listening to invocations of this method will allow the user to establish any data structures required or add any attributes to the session that are needed.

Parameters:
session - this is the session instance that was created

cancel

void cancel(Session<T> session)
This method is called after the session has been canceled or expired. It allows the listener to clean up session resources and attributes in a specialized manner. When finished the session will no longer exist within the application.

Parameters:
session - this is the session object that is canceled