Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jac.aspects.gui.web
Class Session  view Session download Session.java

java.lang.Object
  extended byjac.aspects.gui.web.Session
All Implemented Interfaces:
java.io.Serializable

public class Session
extends java.lang.Object
implements java.io.Serializable

This class defines a session for thin client servers.


Field Summary
protected  java.util.Stack requests
          The requests stack for this session.
protected  java.lang.String sid
          This session's ID.
 
Constructor Summary
Session(java.lang.String sid)
          The constructor for a session with a given ID.
 
Method Summary
 Request endCurrentRequest()
          Ends the current request (same as getRequests().pop()).
 Request getCurrentRequest()
          Returns the current request of this session (same as getRequests().peek()).
 java.lang.String getId()
          Returns the session's ID.
 Request getPreviousRequest()
          Returns the previous request of this session (ie the one that was achieved before the current one).
 int getRequestCount()
          Returns the number of active requests on the requests stack for this session.
 java.util.Stack getRequests()
          Returns the stack of the requests for this session.
 void newRequest(Request request)
          Creates a new request for this session (pushes it on the requests stack).
 java.lang.String toString()
          Gets a humain-readable string representation of the session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

requests

protected transient java.util.Stack requests
The requests stack for this session.


sid

protected java.lang.String sid
This session's ID.

Constructor Detail

Session

public Session(java.lang.String sid)
The constructor for a session with a given ID.

Method Detail

getId

public java.lang.String getId()
Returns the session's ID.


getRequests

public java.util.Stack getRequests()
Returns the stack of the requests for this session.

getRequests().peek() is the request that is currently treated for this session.


getRequestCount

public int getRequestCount()
Returns the number of active requests on the requests stack for this session.


newRequest

public void newRequest(Request request)
Creates a new request for this session (pushes it on the requests stack). The newly created request becomes the current one of the session.


getCurrentRequest

public Request getCurrentRequest()
Returns the current request of this session (same as getRequests().peek()).


getPreviousRequest

public Request getPreviousRequest()
Returns the previous request of this session (ie the one that was achieved before the current one).


endCurrentRequest

public Request endCurrentRequest()
Ends the current request (same as getRequests().pop()).


toString

public java.lang.String toString()
Gets a humain-readable string representation of the session.