jet.server.api
Interface UserSession

All Superinterfaces:
java.io.Serializable

public interface UserSession
extends java.io.Serializable

Interface UserSession represents a user that logs in to the report server.


Method Summary
 void addExpiryListener(ExpiryListener l)
          Deprecated. As of v13 replaced by UserSessionManager.addSessionExpiryListener(ExpiryListener).
 long getCreationTime()
          Returns the creation time of the session.
 ExpiryListener getExpiryListener(int index)
          Deprecated. As of v13, no replace.
 int getExpiryListenerCount()
          Deprecated. As of v13, no replace.
 java.lang.Object getExternalObject()
          Deprecated. replaced by getValue(String name).
 java.lang.String getID()
          Returns the session ID.
 long getLastAccessTime()
          Returns the last accessed time of the session.
 int getMaxInactiveInterval()
          Returns the maximum inactive interval of the session.
 java.lang.String getRealm()
          Returns the realm that the user belongs to.
 java.lang.String getUserID()
          Returns the user ID.
 java.lang.Object getValue(java.lang.String name)
          Returns the object bound with the specified name in this session or null if no object of that name exists.
 int indexOf(ExpiryListener l)
          Deprecated. As of v13, no replace.
 void invalidate()
          Invalidates the user session.
 boolean isExternalAuthorized()
          Checks if this user session is authorized by an external authenticator.
 boolean isTimeOut()
          Checks if this user session is expired.
 boolean isValid()
          Checks if the session is valid.
 void putValue(java.lang.String name, java.lang.Object value)
          Binds an object to this session, using the specified name.
 void refreshLastAccessTime()
          Refreshes the last accessed time of the session.
 void removeExpiryListener(ExpiryListener l)
          Deprecated. As of v13 replaced by UserSessionManager.removeSessionExpiryListener(ExpiryListener).
 void removeValue(java.lang.String name)
          Removes the object bound with the specified name from this session.
 void setExternalObject(java.lang.Object extObj)
          Deprecated. replaced by putValue(String name, Object value).
 void setMaxInactiveInterval(int interval)
          Sets the maximum inactive interval of the session.
 

Method Detail

getID

java.lang.String getID()
Returns the session ID.

Returns:
the session ID.

getRealm

java.lang.String getRealm()
Returns the realm that the user belongs to.

Returns:
the realm that the user belongs to.

getUserID

java.lang.String getUserID()
Returns the user ID.

Returns:
the user ID.

isExternalAuthorized

boolean isExternalAuthorized()
Checks if this user session is authorized by an external authenticator.

Returns:
true if this user session is authorized by an external authenticator.

getExternalObject

java.lang.Object getExternalObject()
Deprecated. replaced by getValue(String name).

Returns the external object.

Returns:
the external object.

setExternalObject

void setExternalObject(java.lang.Object extObj)
Deprecated. replaced by putValue(String name, Object value).

Sets the external object.

Parameters:
extObj - the external object.

getValue

java.lang.Object getValue(java.lang.String name)
Returns the object bound with the specified name in this session or null if no object of that name exists.

Parameters:
name - a string specifying the name of the object
Returns:
the object with the specified name

putValue

void putValue(java.lang.String name,
              java.lang.Object value)
Binds an object to this session, using the specified name. If an object of the same name is already bound to the session, the object is replaced.

Parameters:
name - the name to which the object is bound, which cannot be null
value - the object to be bound, which must be Serializable
Throws:
java.lang.IllegalArgumentException - if the value is not Serializable

removeValue

void removeValue(java.lang.String name)
Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.

Parameters:
name - the name of the object to remove from this session

isValid

boolean isValid()
Checks if the session is valid.

Returns:
if the session is valid.

invalidate

void invalidate()
Invalidates the user session.


getCreationTime

long getCreationTime()
Returns the creation time of the session.

Returns:
the creation time of the session.

getLastAccessTime

long getLastAccessTime()
Returns the last accessed time of the session.

Returns:
the last accessed time of the session.

refreshLastAccessTime

void refreshLastAccessTime()
                           throws InvalidUserSessionException
Refreshes the last accessed time of the session.

Throws:
InvalidUserSessionException - if an InvalidUserSessionException occurs.

getMaxInactiveInterval

int getMaxInactiveInterval()
Returns the maximum inactive interval of the session.

Returns:
the maximum inactive interval of the session in milliseconds.

setMaxInactiveInterval

void setMaxInactiveInterval(int interval)
Sets the maximum inactive interval of the session.

Parameters:
interval - the maximum inactive interval of the session in milliseconds.

addExpiryListener

void addExpiryListener(ExpiryListener l)
Deprecated. As of v13 replaced by UserSessionManager.addSessionExpiryListener(ExpiryListener).

Adds an expired listener to the session.

Parameters:
l - the listener that will be added.

removeExpiryListener

void removeExpiryListener(ExpiryListener l)
Deprecated. As of v13 replaced by UserSessionManager.removeSessionExpiryListener(ExpiryListener).

Removes an expired listener from the session.

Parameters:
l - the listener that will be removed.

getExpiryListenerCount

int getExpiryListenerCount()
Deprecated. As of v13, no replace.

Gets expired listener count.

Returns:
the count of ExpiryListener in the session.

getExpiryListener

ExpiryListener getExpiryListener(int index)
Deprecated. As of v13, no replace.

Gets expired listener from the session.

Parameters:
index - the index of expired listener array.
Returns:
an expired listener or null. If parameter index is out of range of the array a null value is returned.

indexOf

int indexOf(ExpiryListener l)
Deprecated. As of v13, no replace.

Gets index of an expired listener in the expired listener array.

Parameters:
l - the listener.
Returns:
the index of -1. If parameter l is not in the array -1 is returned.

isTimeOut

boolean isTimeOut()
Checks if this user session is expired.

Returns:
true if this user session is expired.