Package com.iplanet.dpro.session.utils
Class SessionInfoFactory
- java.lang.Object
-
- com.iplanet.dpro.session.utils.SessionInfoFactory
-
public class SessionInfoFactory extends Object
Responsible for providing a collection of utility functions for manipulating InternalSessions.
-
-
Field Summary
Fields Modifier and Type Field Description static StringINVALID_SESSION_STATEstatic StringSESSION_TIMED_OUT
-
Constructor Summary
Constructors Constructor Description SessionInfoFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionInfogetSessionInfo(InternalSession internalSession, SessionID sessionID)Generates a SessionInfo which is a summary state of the Session used to refresh remote instances of a Session.SessionInfomakeSessionInfo(InternalSession internalSession, SessionID sid)Generates a SessionInfo object from the given InternalSession.voidvalidateSession(InternalSession internalSession, SessionID sid)Validates the state of an Internal Session against a Session ID.
-
-
-
Field Detail
-
INVALID_SESSION_STATE
public static final String INVALID_SESSION_STATE
- See Also:
- Constant Field Values
-
SESSION_TIMED_OUT
public static final String SESSION_TIMED_OUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSessionInfo
public SessionInfo getSessionInfo(InternalSession internalSession, SessionID sessionID) throws SessionException
Generates a SessionInfo which is a summary state of the Session used to refresh remote instances of a Session.- Parameters:
internalSession- Non null InternalSession to summarise.sessionID- SessionID of the caller making the request.- Returns:
- Non null SessionInfo.
- Throws:
SessionException- If there was a problem accessing the underlying Session.
-
validateSession
public void validateSession(InternalSession internalSession, SessionID sid) throws SessionException
Validates the state of an Internal Session against a Session ID. Performs two checks, firstly that the Session matches the SessionID and secondly that the InternalSession is not timed out.- Parameters:
internalSession- InternalSession to check.sid- SessionID to check with the InternalSession.- Throws:
SessionException- If the InternalSession has timed out.IllegalArgumentException- If the SessionID of the InternalSession and provided SessionID do not match.
-
makeSessionInfo
public SessionInfo makeSessionInfo(InternalSession internalSession, SessionID sid) throws SessionException
Generates a SessionInfo object from the given InternalSession.- Parameters:
internalSession- Non null InternalSession to use.sid- Session ID for the user performing the action.- Returns:
- A non null SessionInfo instance if valid.
- Throws:
SessionException- If there was an error storing the TokenRestriction on the SessionInfo.IllegalAccessException- If this method has not been called in-conjunction with SessionInfoFactory#validateSession
-
-