jet.server.api.rmi
Interface RemoteUserSessionManager

All Superinterfaces:
java.rmi.Remote

public interface RemoteUserSessionManager
extends java.rmi.Remote

Interface RemoteUserSessionManager manages the user sessions.


Method Summary
 java.util.Vector getAllUserSessions()
          Gets all user sessions in the report server.
 java.util.Vector getAllWaitUserSessions()
          Gets all waiting user sessions in the report server.
 RemoteAuthenticator getAuthenticator()
          Gets the Authenticator.
 int getDefaultMaxInactiveInterval()
          Gets the default maximum inactive interval of user sessions.
 long getLastLoginTime(java.lang.String user)
          Gets the last login time of the specified user.
 long getLastLogoutTime(java.lang.String user)
          Gets the last logout time of the specified user.
 UserSession getUserSession(java.lang.String sessionID)
          Gets the user session by the session ID.
 boolean isWait(java.lang.String sessionId)
          Judges if a user session is a waiting user session.
 UserSession login(java.lang.String realm, java.lang.String user, java.lang.String password)
          Logs in a user in the report server.
 UserSession login(java.lang.String realm, java.lang.String userID, java.lang.String password, boolean isExternal, boolean isWait)
          Logs in a user in the report server.
 UserSession loginExternalAuthorized(java.lang.String realm, java.lang.String externalAuthorizedUser)
          Logs in an external authorized user in the report server.
 void logout(java.lang.String sessionID)
          Logs out a user session in the report server.
 boolean needSecurity()
          Checks if it needs security checking.
 void putSessions(java.lang.String sessionID)
          Puts a user session specified by session ID to sessions.
 void refreshLastAccessTime(java.lang.String sessionID)
          Refreshes the last accessed time of a user session.
 void setAuthenticator(RemoteAuthenticator authenticator)
          Sets the Authenticator.
 void setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval)
          Sets the default maximum inactive interval of user sessions.
 void updateUserSession(UserSession us)
          Notify this UserSessionManager, the specified user session was updated (e.g.
 

Method Detail

setDefaultMaxInactiveInterval

void setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval)
                                   throws java.rmi.RemoteException
Sets the default maximum inactive interval of user sessions.

Parameters:
defaultMaxInactiveInterval - the default maximum inactive interval of user sessions in milliseconds.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getDefaultMaxInactiveInterval

int getDefaultMaxInactiveInterval()
                                  throws java.rmi.RemoteException
Gets the default maximum inactive interval of user sessions.

Returns:
defaultMaxInactiveInterval the default maximum inactive interval of user sessions in milliseconds.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

setAuthenticator

void setAuthenticator(RemoteAuthenticator authenticator)
                      throws java.rmi.RemoteException
Sets the Authenticator.

Parameters:
authenticator - the Authenticator.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getAuthenticator

RemoteAuthenticator getAuthenticator()
                                     throws java.rmi.RemoteException
Gets the Authenticator.

Returns:
the Authenticator.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

login

UserSession login(java.lang.String realm,
                  java.lang.String user,
                  java.lang.String password)
                  throws java.rmi.RemoteException,
                         TooManyUsersException
Logs in a user in the report server.

Parameters:
realm - the realm.
userID - the user ID.
password - the password.
Returns:
the user session.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.
TooManyUsersException - if a TooManyUsersException occurs.
See Also:
UserSession

login

UserSession login(java.lang.String realm,
                  java.lang.String userID,
                  java.lang.String password,
                  boolean isExternal,
                  boolean isWait)
                  throws java.rmi.RemoteException,
                         TooManyUsersException
Logs in a user in the report server.

Parameters:
realm - the realm.
userID - the user ID.
password - the password.
isExternal - specifies if it was checked by external authenticator.
isWait - specified if it is a waiting user.
Returns:
the user session.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.
TooManyUsersException - if a TooManyUsersException occurs.
See Also:
UserSession

loginExternalAuthorized

UserSession loginExternalAuthorized(java.lang.String realm,
                                    java.lang.String externalAuthorizedUser)
                                    throws java.rmi.RemoteException,
                                           TooManyUsersException
Logs in an external authorized user in the report server. Needs no password.

Parameters:
realm - the realm.
userID - the user ID.
Returns:
the user session.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.
TooManyUsersException - if a TooManyUsersException occurs.
See Also:
UserSession

logout

void logout(java.lang.String sessionID)
            throws java.rmi.RemoteException
Logs out a user session in the report server.

Parameters:
sessionID - the user session ID.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getUserSession

UserSession getUserSession(java.lang.String sessionID)
                           throws java.rmi.RemoteException
Gets the user session by the session ID.

Parameters:
sessionID - the session ID.
Returns:
the user session.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getAllUserSessions

java.util.Vector getAllUserSessions()
                                    throws java.rmi.RemoteException
Gets all user sessions in the report server.

Returns:
all user sessions in the report server.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getAllWaitUserSessions

java.util.Vector getAllWaitUserSessions()
                                        throws java.rmi.RemoteException
Gets all waiting user sessions in the report server.

Returns:
all waiting user sessions in the report server.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

refreshLastAccessTime

void refreshLastAccessTime(java.lang.String sessionID)
                           throws java.rmi.RemoteException,
                                  InvalidUserSessionException
Refreshes the last accessed time of a user session.

Parameters:
sessionID - the session ID.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.
InvalidUserSessionException - if an InvalidUserSessionException occurs.

isWait

boolean isWait(java.lang.String sessionId)
               throws java.rmi.RemoteException
Judges if a user session is a waiting user session.

Parameters:
sessionId - the user session id
Returns:
true if the sessionId represents a waiting user session, otherwise false.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

putSessions

void putSessions(java.lang.String sessionID)
                 throws java.rmi.RemoteException
Puts a user session specified by session ID to sessions.

Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

needSecurity

boolean needSecurity()
                     throws java.rmi.RemoteException
Checks if it needs security checking.

Returns:
if it needs security checking.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getLastLoginTime

long getLastLoginTime(java.lang.String user)
                      throws java.rmi.RemoteException
Gets the last login time of the specified user.

Parameters:
user - the user ID
Returns:
the last login time of the specified user.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

getLastLogoutTime

long getLastLogoutTime(java.lang.String user)
                       throws java.rmi.RemoteException
Gets the last logout time of the specified user.

Parameters:
user - the user ID
Returns:
the last logout time of the specified user.
Throws:
java.rmi.RemoteException - if communication-related error occurs during RMI call execution.

updateUserSession

void updateUserSession(UserSession us)
                       throws java.rmi.RemoteException,
                              InvalidUserSessionException
Notify this UserSessionManager, the specified user session was updated (e.g. after calling putValue/removeValue).

Parameters:
us -
Throws:
java.rmi.RemoteException
InvalidUserSessionException - if the specified UserSession is not exist.