Cumulus4j API
(1.1.1)

org.cumulus4j.keymanager
Class Session

java.lang.Object
  extended by org.cumulus4j.keymanager.Session

public class Session
extends Object

Session to control and restrict the key exchange with the application server.

In order to protect the keys as well as possible, keys can only be requested from an application server within the scope of a so-called crypto-session. The client controls when to open/close a crypto-session and when to allow keys to be transferred. Key transfer is only possible while a session is unlocked.

This is not API! Use the classes and interfaces provided by org.cumulus4j.keymanager.api instead.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Constructor Summary
protected Session(SessionManager sessionManager, String userName, char[] password)
           
 
Method Summary
 void destroy()
           
 String getCryptoSessionID()
          Get the identifier of this session.
 Date getExpiry()
           
 Date getLastUse()
           
 char[] getPassword()
           
 String getUserName()
           
 boolean isReleased()
           
 void reacquire()
           
 void release()
           
protected  void setReleased(boolean released)
           Set the 'released' status.
protected  void updateLastUse(long expiryAgeMSec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

protected Session(SessionManager sessionManager,
                  String userName,
                  char[] password)
Method Detail

getCryptoSessionID

public String getCryptoSessionID()
Get the identifier of this session.

Returns:
the session's unique identifier.

getUserName

public String getUserName()

getPassword

public char[] getPassword()

getLastUse

public Date getLastUse()

updateLastUse

protected void updateLastUse(long expiryAgeMSec)

getExpiry

public Date getExpiry()

destroy

public void destroy()

setReleased

protected void setReleased(boolean released)

Set the 'released' status.

The application server can only request keys from a session that is currently acquired. That means, a session should first be acquired, then the app-server should be made to work (on behalf of the client) and finally, it should be released again.

Parameters:
released - the new 'released' status.

release

public void release()

isReleased

public boolean isReleased()

reacquire

public void reacquire()

Cumulus4j API
(1.1.1)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.