IAIK PKCS#11 Wrapper
version 1.5

iaik.pkcs.pkcs11
Class DefaultInitializeArgs

java.lang.Object
  |
  +--iaik.pkcs.pkcs11.DefaultInitializeArgs
All Implemented Interfaces:
InitializeArgs

public class DefaultInitializeArgs
extends java.lang.Object
implements InitializeArgs

This class is a simeple implementation of InitializeArgs.

Version:
1.0
Author:
Karl Scheibelhofer

Field Summary
protected  boolean libraryCantCreateOsThreads_
          Indicates that application threads which are executing calls to the library may not use native operating system calls to spawn new threads.
protected  MutexHandler mutexHandler_
          The mutex-handler of this object.
protected  boolean osLockingOk_
          Indicates that the libary may use mechanisms of the operating-system to do thread-locking.
protected  java.lang.Object reserved_
          The reserved parameter in the initialization arguments.
 
Constructor Summary
DefaultInitializeArgs()
          Default constructor.
DefaultInitializeArgs(MutexHandler mutexHandler, boolean libraryCantCreateOsThreads, boolean osLockingOk)
          Constructor, taking a mutex-handler, the libraryCantCreateOsThreads flag and the osLockingOk flag.
 
Method Summary
 MutexHandler getMutexHandler()
          This method returns the object that implements the functionality for handling mutexes.
 java.lang.Object getReserved()
          Reserved parameter.
 boolean isLibraryCantCreateOsThreads()
          Check, if application threads which are executing calls to the library may not use native operating system calls to spawn new threads.
 boolean isOsLockingOk()
          Check, if the library can use the native operation system threading model for locking.
 void setLibraryCantCreateOsThreads(boolean libraryCantCreateOsThreads)
          Set, if application threads which are executing calls to the library may not use native operating system calls to spawn new threads.
 void setMutexHandler(MutexHandler mutexHandler)
          This method sets the object that implements the functionality for handling mutexes.
 void setOsLockingOk(boolean osLockingOk)
          set, if the library can use the native operation system threading model for locking.
 void setReserved(java.lang.Object reserved)
          Set the reserved parameter.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mutexHandler_

protected MutexHandler mutexHandler_
The mutex-handler of this object.

libraryCantCreateOsThreads_

protected boolean libraryCantCreateOsThreads_
Indicates that application threads which are executing calls to the library may not use native operating system calls to spawn new threads.

osLockingOk_

protected boolean osLockingOk_
Indicates that the libary may use mechanisms of the operating-system to do thread-locking.

reserved_

protected java.lang.Object reserved_
The reserved parameter in the initialization arguments.
Constructor Detail

DefaultInitializeArgs

public DefaultInitializeArgs()
Default constructor.

DefaultInitializeArgs

public DefaultInitializeArgs(MutexHandler mutexHandler,
                             boolean libraryCantCreateOsThreads,
                             boolean osLockingOk)
Constructor, taking a mutex-handler, the libraryCantCreateOsThreads flag and the osLockingOk flag.
Parameters:
mutexHandler - The PKCS#11 module should use this mutex-handler.
libraryCantCreateOsThreads - Indicates that application threads which are executing calls to the library may not use native operating system calls to spawn new threads .
osLockingOk - Indicates that the libary may use mechanisms of the operating-system to do thread-locking.
Method Detail

getMutexHandler

public MutexHandler getMutexHandler()
This method returns the object that implements the functionality for handling mutexes. It returns null, if no handler is set. If this method returns null, the wrapper does not pass any callback functions to the underlying module; i.e. is passes null-pointer for the functions.
Specified by:
getMutexHandler in interface InitializeArgs
Returns:
The handler object for mutex functionality, or null, if there is no handler for mutexes.

isLibraryCantCreateOsThreads

public boolean isLibraryCantCreateOsThreads()
Check, if application threads which are executing calls to the library may not use native operating system calls to spawn new threads.
Specified by:
isLibraryCantCreateOsThreads in interface InitializeArgs
Returns:
True, if application threads which are executing calls to the library may not use native operating system calls to spawn new threads. False, if they may.

isOsLockingOk

public boolean isOsLockingOk()
Check, if the library can use the native operation system threading model for locking.
Specified by:
isOsLockingOk in interface InitializeArgs
Returns:
True, if the library can use the native operation system threading model for locking. Fasle, otherwise.

getReserved

public java.lang.Object getReserved()
Reserved parameter.
Specified by:
getReserved in interface InitializeArgs
Returns:
Should be null in this version.

setMutexHandler

public void setMutexHandler(MutexHandler mutexHandler)
This method sets the object that implements the functionality for handling mutexes. It should be null to set no handler.
Parameters:
mutexHandler - The handler object for mutex functionality, or null to use no handler.

setLibraryCantCreateOsThreads

public void setLibraryCantCreateOsThreads(boolean libraryCantCreateOsThreads)
Set, if application threads which are executing calls to the library may not use native operating system calls to spawn new threads.
Parameters:
libraryCantCreateOsThreads - True, if application threads which are executing calls to the library may not use native operating system calls to spawn new threads. False, if they may.

setOsLockingOk

public void setOsLockingOk(boolean osLockingOk)
set, if the library can use the native operation system threading model for locking.
Parameters:
osLockingOk - True, if the library can use the native operation system threading model for locking. Fasle, otherwise.

setReserved

public void setReserved(java.lang.Object reserved)
Set the reserved parameter.
Parameters:
reserved - Should be null in this version.

toString

public java.lang.String toString()
Returns the string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
The string representation of object

IAIK PKCS#11 Wrapper
version 1.5

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.5