gov.nih.nci.common.search.session
Interface SecureSession

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
SecureSessionImpl

public interface SecureSession
extends java.lang.Cloneable

Author:
Joshua Phillips

Method Summary
 java.lang.Object clone()
          Returns a deep copy of this object.
 void end()
          Invalidates the session.
 void extend()
          Extends the current session by SecureSessionManager.DEFAULT_SESSION_LENGTH milliseconds.
 java.lang.String getSessionId()
          Gets the internal session ID for this session.
 long getStartTime()
          Gets the time in milliseconds when the session was started or the last time refresh was called.
 long getTimeToLive()
          Gets the time in milliseconds until this session will be invalidated.
 void refresh()
          Sets the startTime to the current time.
 void setSessionId(java.lang.String id)
          Sets the internal ID of this session.
 boolean start(java.lang.String username, java.lang.String password)
           
 

Method Detail

start

boolean start(java.lang.String username,
              java.lang.String password)
              throws SessionException
Throws:
SessionException

getSessionId

java.lang.String getSessionId()
Gets the internal session ID for this session.

Returns:
session ID

setSessionId

void setSessionId(java.lang.String id)
Sets the internal ID of this session.

Parameters:
id -

getTimeToLive

long getTimeToLive()
                   throws SessionException
Gets the time in milliseconds until this session will be invalidated.

Returns:
time to live
Throws:
SessionException

getStartTime

long getStartTime()
Gets the time in milliseconds when the session was started or the last time refresh was called.

Returns:
start time

extend

void extend()
            throws SessionException
Extends the current session by SecureSessionManager.DEFAULT_SESSION_LENGTH milliseconds.

Throws:
SessionException

refresh

void refresh()
Sets the startTime to the current time.


end

void end()
         throws SessionException
Invalidates the session.

Throws:
SessionException

clone

java.lang.Object clone()
Returns a deep copy of this object.

Returns:
Object - SecureSession