Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api
Interface UserSessionManager

All Known Subinterfaces:
  HttpUserSessionManager

    public interface UserSessionManager

Interface `UserSessionManager` manages the user sessions.

Method Summary
`boolean` | `addSessionExpiryListener(ExpiryListener listener)` Add user session expired listener. duplicated add same listener instance will be ignored, test by listener.equals().
`java.util.Enumeration` | `getAllUserSessions()` Gets all user sessions in the report server.
`java.util.Enumeration` | `getAllWaitUserSessions()` Gets all waiting user sessions in the report server.
`Authenticator` | `getAuthenticator()` Gets the Authenticator.
`int` | `getDefaultMaxInactiveInterval()` Gets the default maximum inactive interval of user sessions.
`long` | `getLastLoginTime(java.lang.String user)` Gets last login time of the specified user.
`long` | `getLastLogoutTime(java.lang.String user)` Gets 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)` Checks if to wait for the specified user session.
`UserSession` | `login(java.lang.String realm, java.lang.String user, java.lang.String password, java.lang.Object extObj)` Logins a user in the report server.
`UserSession` | `loginExternalAuthorized(java.lang.String realm, java.lang.String externalAuthorizedUser, java.lang.Object extObj)` Logs in an external authorized user in the report server.
`void` | `logout(UserSession session)` Logs out a user session in the report server.
`boolean` | `needSecurity()` Checks if it needs security checking.
`void` | `putSessions(UserSession us)` Puts a specified user session
`void` | `refreshLastAccessTime(java.lang.String sessionID)` Refreshes the last accessed time of a user session.
`boolean` | `removeSessionExpiryListener(ExpiryListener listener)` Remove user session expired listener.
`void` | `setAuthenticator(Authenticator 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)

  Sets the default maximum inactive interval of user sessions.

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

### getDefaultMaxInactiveInterval

    int getDefaultMaxInactiveInterval()

  Gets the default maximum inactive interval of user sessions.

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

### setAuthenticator

    void setAuthenticator(Authenticator authenticator)

  Sets the Authenticator.

  Parameters:
    `authenticator` - the Authenticator.

### getAuthenticator

    Authenticator getAuthenticator()

  Gets the Authenticator.

  Returns:
    the Authenticator.

### login

    UserSession login(java.lang.String realm,
                      java.lang.String user,
                      java.lang.String password,
                      java.lang.Object extObj)
                      throws TooManyUsersException

  Logins a user in the report server.

  Parameters:
    `realm` - the realm.
    `userID` - the user ID.
    `password` - the password.
    `extObj` - the external object 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

  Logs in an external authorized user in the report server. Needs no password.

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

### logout

    void logout(UserSession session)

  Logs out a user session in the report server.

  Parameters:
    `session` - the user session.

### getUserSession

    UserSession getUserSession(java.lang.String sessionID)

  Gets the user session by the session ID.

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

### getAllUserSessions

    java.util.Enumeration getAllUserSessions()

  Gets all user sessions in the report server.

  Returns:
    all user sessions in the report server.

### getAllWaitUserSessions

    java.util.Enumeration getAllWaitUserSessions()

  Gets all waiting user sessions in the report server.

  Returns:
    all waiting user sessions in the report server.

### refreshLastAccessTime

    void refreshLastAccessTime(java.lang.String sessionID)
                               throws InvalidUserSessionException

  Refreshes the last accessed time of a user session.

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

### isWait

    boolean isWait(java.lang.String sessionId)

  Checks if to wait for the specified user session.

  Parameters:
    `sessionID` - the session ID.
  Returns:
    Whether to wait for the user session.

### putSessions

    void putSessions(UserSession us)

  Puts a specified user session

  Parameters:
    `us` - UserSession object

### needSecurity

    boolean needSecurity()

  Checks if it needs security checking.

  Returns:
    if it needs security checking.

### getLastLoginTime

    long getLastLoginTime(java.lang.String user)

  Gets last login time of the specified user.

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

### getLastLogoutTime

    long getLastLogoutTime(java.lang.String user)

  Gets last logout time of the specified user.

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

### addSessionExpiryListener

    boolean addSessionExpiryListener(ExpiryListener listener)

  Add user session expired listener.
  duplicated add same listener instance will be ignored, test by listener.equals().

  All listeners on this server will be notified if any user session expired or logout.

  Notes
  remote implementation not support this operation.

  Parameters:
    `listener` -
  Returns:
    true if current listeners not contains the specified listener, otherwise false.
  Since:
    13.0

### removeSessionExpiryListener

    boolean removeSessionExpiryListener(ExpiryListener listener)

  Remove user session expired listener.

  Notes
  remote implementation not support this operation.

  Parameters:
    `listener` -
  Returns:
    true if current listeners contains the specified listener.
  Since:
    13.0

### updateUserSession

    void updateUserSession(UserSession us)
                           throws InvalidUserSessionException

  Notify this UserSessionManager, the specified user session was updated (e.g. after calling putValue/removeValue)

  Parameters:
    `us` -
  Throws:
    `InvalidUserSessionException` - if the specified UserSession is not exist.
  Since:
    13.0

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD