VLab Common 1.2

pl.psnc.vlab.remote.session
Class VlabSessionRemoteImpl

java.lang.Object
  extended by pl.psnc.vlab.remote.session.VlabSessionRemoteImpl
All Implemented Interfaces:
VlabSessionRemote

public class VlabSessionRemoteImpl
extends java.lang.Object
implements VlabSessionRemote

VlabSessionRemoteImpl class - implementation of the interface to the VLab Communication Proxy module (which is written in C). It allows sending messages to the VLab sytem.

Author:
Dominik Stoklosa (~osa~)
Email address
osa@man.poznan.pl

Constructor Summary
VlabSessionRemoteImpl()
           
 
Method Summary
 SessionValue getAppSession(java.lang.String sessionKey)
          Retrieve session information by the given session key
 byte[] getUserProxy(int userId)
          Get the user proxy
 boolean isSessionValid(java.lang.String sessionKey)
          Checks whether the current session is valid.
 boolean removeSession(java.lang.String sessionKey)
          Deletes session from the database by the given session key
 boolean updateSession(java.lang.String sessionKey)
          Updates timestamp in the current session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VlabSessionRemoteImpl

public VlabSessionRemoteImpl()
                      throws VlabException
Throws:
VlabException
Method Detail

getAppSession

public SessionValue getAppSession(java.lang.String sessionKey)
                           throws VlabException
Retrieve session information by the given session key

Specified by:
getAppSession in interface VlabSessionRemote
Parameters:
sessionKey - session key
Returns:
session object
Throws:
VlabException - VLabException indicates an exception which may occur during call

isSessionValid

public boolean isSessionValid(java.lang.String sessionKey)
                       throws VlabException
Checks whether the current session is valid. The session is valid if the following condition is true: current_timestamp < last_valid_timestamp + timestamp_limit timestamo_limit is stored in the database

Specified by:
isSessionValid in interface VlabSessionRemote
Parameters:
sessionKey - session key
Returns:
true if the session is valid false otherwise
Throws:
VlabException - VLabException indicates an exception which may occur during call

removeSession

public boolean removeSession(java.lang.String sessionKey)
                      throws VlabException
Deletes session from the database by the given session key

Specified by:
removeSession in interface VlabSessionRemote
Parameters:
sessionKey - session key
Returns:
true if the operation succeeds false otherwise
Throws:
VlabException - VLabException indicates an exception which may occur during call

updateSession

public boolean updateSession(java.lang.String sessionKey)
                      throws VlabException
Updates timestamp in the current session

Specified by:
updateSession in interface VlabSessionRemote
Parameters:
sessionKey - session key
Returns:
true if the operation succeeds false otherwise
Throws:
VlabException - VLabException indicates an exception which may occur during call

getUserProxy

public byte[] getUserProxy(int userId)
                    throws VlabException
Get the user proxy

Specified by:
getUserProxy in interface VlabSessionRemote
Parameters:
userId -
Returns:
user proxy as a byte array
Throws:
VlabException - indicates an exception which may occur during call

VLab Common 1.2

Copyright 2004 by VLAB Dominik Stoklosa.