jet.server.api
Interface UserSessionManager

All Known Subinterfaces:
HttpUserSessionManager

public interface UserSessionManager

Interface UserSessionManager manages the user sessions.


Method Summary
 java.util.Enumeration getAllUserSessions()
          Get all user sessions in the report server.
 java.util.Enumeration getAllWaitUserSessions()
          Get all wait user sessions in the report server.
 Authenticator getAuthenticator()
          Get the Authenticator.
 int getDefaultMaxInactiveInterval()
          Get the default max inactive interval of user sessions.
 long getLastLoginTime(java.lang.String user)
          Get last login time of specify user.
 long getLastLogoutTime(java.lang.String user)
          Get last logout time of specify user.
 UserSession getUserSession(java.lang.String sessionID)
          Get the user session by the session ID.
 boolean isWait(java.lang.String sessionId)
           
 UserSession login(java.lang.String realm, java.lang.String user, java.lang.String password, java.lang.Object extObj)
          Login an user in the report server.
 UserSession loginExternalAuthorized(java.lang.String realm, java.lang.String externalAuthorizedUser, java.lang.Object extObj)
          Login an external authorized user in the report server.
 void logout(UserSession session)
          Logout an user session in the report server.
 boolean needSecurity()
          Check if it needs security checking.
 void putSessions(UserSession us)
           
 void refreshLastAccessTime(java.lang.String sessionID)
          Refresh the last access time of a user session.
 void setAuthenticator(Authenticator authenticator)
          Set the Authenticator.
 void setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval)
          Set the default max inactive interval of user sessions.
 

Method Detail

setDefaultMaxInactiveInterval

void setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval)
Set the default max inactive interval of user sessions.

Parameters:
defaultMaxInactiveInterval - the default max inactive interval of user sessions in milliseconds.

getDefaultMaxInactiveInterval

int getDefaultMaxInactiveInterval()
Get the default max inactive interval of user sessions.

Returns:
defaultMaxInactiveInterval the default max inactive interval of user sessions in milliseconds.

setAuthenticator

void setAuthenticator(Authenticator authenticator)
Set the Authenticator.

Parameters:
authenticator - the Authenticator.

getAuthenticator

Authenticator getAuthenticator()
Get the Authenticator.

Returns:
the Athenticator.

login

UserSession login(java.lang.String realm,
                  java.lang.String user,
                  java.lang.String password,
                  java.lang.Object extObj)
                  throws TooManyUsersException
Login an user in the report server.

Parameters:
realm - the realm.
userID - the user ID.
password - the password.
extObj - the external object is attached to the user session.
Returns:
the user session.
Throws:
TooManyUsersException - if a TooManyUsersException occurs.
See Also:
UserSession

loginExternalAuthorized

UserSession loginExternalAuthorized(java.lang.String realm,
                                    java.lang.String externalAuthorizedUser,
                                    java.lang.Object extObj)
                                    throws TooManyUsersException
Login an external authorized user in the report server. Need not password.

Parameters:
realm - the realm.
userID - the user ID.
extObj - the external object is attached to the user session.
Returns:
the user session.
Throws:
TooManyUsersException - if a TooManyUsersException occurs.
See Also:
UserSession

logout

void logout(UserSession session)
Logout an user session in the report server.

Parameters:
session - the user session.

getUserSession

UserSession getUserSession(java.lang.String sessionID)
Get the user session by the session ID.

Parameters:
sessionID - the session ID.
Returns:
the user session.

getAllUserSessions

java.util.Enumeration getAllUserSessions()
Get all user sessions in the report server.

Returns:
all user sessions in the report server.

getAllWaitUserSessions

java.util.Enumeration getAllWaitUserSessions()
Get all wait user sessions in the report server.

Returns:
all wait user sessions in the report server.

refreshLastAccessTime

void refreshLastAccessTime(java.lang.String sessionID)
                           throws InvalidUserSessionException
Refresh the last access time of a user session.

Parameters:
sessionID - the session ID.
Throws:
InvalidUserSessionException - if a InvalidUserSessionException occurs.

isWait

boolean isWait(java.lang.String sessionId)

putSessions

void putSessions(UserSession us)

needSecurity

boolean needSecurity()
Check if it needs security checking.

Returns:
if it needs security checking.

getLastLoginTime

long getLastLoginTime(java.lang.String user)
Get last login time of specify user.

Parameters:
user - the user ID
Returns:
the last login time of specify user.

getLastLogoutTime

long getLastLogoutTime(java.lang.String user)
Get last logout time of specify user.

Parameters:
user - the user ID
Returns:
the last logout time of specify user.