Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## iaik.pkcs.pkcs11
Class DefaultInitializeArgs

    java.lang.Object
      iaik.pkcs.pkcs11.DefaultInitializeArgs

All Implemented Interfaces:
  InitializeArgs

public class DefaultInitializeArgs
extends Object
implements InitializeArgs

This class is a simeple implementation of InitializeArgs.

Invariants

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 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.
`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(Object reserved)` Set the reserved parameter.
`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 Object reserved_

  The reserved parameter in the initialization arguments.

Constructor Detail

### DefaultInitializeArgs

    public DefaultInitializeArgs()

  Default constructor.

Preconditions
Postconditions
  (mutexHandler_ == null) and (libraryCantCreateOsThreads_ == false) and (osLockingOk_ == true)

### 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.
Preconditions
Postconditions
  (mutexHandler_ == mutexHandler) and (libraryCantCreateOsThreads_ == libraryCantCreateOsThreads) and (osLockingOk_ == osLockingOk)

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.
  Preconditions
  Postconditions
    (result == mutexHandler_)

### 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.
  Preconditions
  Postconditions
    (result == libraryCantCreateOsThreads_)

### 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.
  Preconditions
  Postconditions
    (result == osLockingOk_)

### getReserved

    public Object getReserved()

  Reserved parameter.

  Specified by:
    `getReserved` in interface `InitializeArgs`
  Returns:
    Should be null in this version.
  Preconditions
  Postconditions

### 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.
  Preconditions
  Postconditions
    (mutexHandler_ = mutexHandler)

### 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.
  Preconditions
  Postconditions
    (libraryCantCreateOsThreads_ == libraryCantCreateOsThreads)

### 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.
  Preconditions
  Postconditions
    (osLockingOk_ == osLockingOk)

### setReserved

    public void setReserved(Object reserved)

  Set the reserved parameter.

  Parameters:
    `reserved` - Should be null in this version.
  Preconditions
  Postconditions

### toString

    public String toString()

  Returns the string representation of this object.

  Returns:
    The string representation of object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2002, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.