IAIK PKCS#11 Provider API Documentation
version 1.6

iaik.pkcs.pkcs11.provider
Class SessionContainer

java.lang.Object
  extended by iaik.pkcs.pkcs11.provider.SessionContainer

public class SessionContainer
extends java.lang.Object

Wraps a session and adds a simple way to create and dispose dummy sessions.


Constructor Summary
SessionContainer(TokenManager tokenManager, iaik.pkcs.pkcs11.Session session)
          Instantiates a new session container.
 
Method Summary
 void disposeSessionIfDummy()
          Disposes the current session if it is a dummy session.
 iaik.pkcs.pkcs11.Session getSession()
          Gets the session.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionContainer

public SessionContainer(TokenManager tokenManager,
                        iaik.pkcs.pkcs11.Session session)
                 throws IAIKPkcs11TokenUnavailableException,
                        iaik.pkcs.pkcs11.TokenException
Instantiates a new session container. Creates a dummy session if session == null.

Parameters:
tokenManager - the token manager
session - the session
Throws:
IAIKPkcs11TokenUnavailableException - the iAIK pkcs11 token unavailable exception
iaik.pkcs.pkcs11.TokenException - the token exception
Method Detail

getSession

public iaik.pkcs.pkcs11.Session getSession()
Gets the session.

Returns:
the session

disposeSessionIfDummy

public void disposeSessionIfDummy()
Disposes the current session if it is a dummy session.


IAIK PKCS#11 Provider API Documentation
version 1.6

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.6