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 State

    java.lang.Object
      iaik.pkcs.pkcs11.State

All Implemented Interfaces:
  Cloneable

public class State
extends Object
implements Cloneable

Objects of this class show the state of a session. This state is only a snapshot of the session's state at the time this state object was created.

Invariants

Field Summary
`protected long` | `code_` The status code of this state as defined in PKCS#11.
`static State` | `RO_PUBLIC_SESSION` Constant for a read-only public session.
`static State` | `RO_USER_FUNCTIONS` Constant for a read-only user session.
`static State` | `RW_PUBLIC_SESSION` Constant for a read-write public session.
`static State` | `RW_SO_FUNCTIONS` Constant for a read-write security officer session.
`static State` | `RW_USER_FUNCTIONS` Constant for a read-write user session.

Constructor Summary
`protected` | `State(long code)` Constructor that simply takes the status code as defined in PKCS#11.

Method Summary
`Object` | `clone()` Create a (deep) clone of this object.
`boolean` | `equals(Object otherObject)` Compares the state code of this object with the other object.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`String` | `toString()` Returns the string representation of this object.

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### RO_PUBLIC_SESSION

    public static final State RO_PUBLIC_SESSION

  Constant for a read-only public session.

### RO_USER_FUNCTIONS

    public static final State RO_USER_FUNCTIONS

  Constant for a read-only user session.

### RW_PUBLIC_SESSION

    public static final State RW_PUBLIC_SESSION

  Constant for a read-write public session.

### RW_USER_FUNCTIONS

    public static final State RW_USER_FUNCTIONS

  Constant for a read-write user session.

### RW_SO_FUNCTIONS

    public static final State RW_SO_FUNCTIONS

  Constant for a read-write security officer session.

### code_

    protected long code_

  The status code of this state as defined in PKCS#11.

Constructor Detail

### State

    protected State(long code)

  Constructor that simply takes the status code as defined in PKCS#11.

Parameters:
  `code` - One of: PKCS11Constants.CKS_RO_PUBLIC_SESSION, PKCS11Constants.CKS_RO_USER_FUNCTIONS, PKCS11Constants.CKS_RW_PUBLIC_SESSION, PKCS11Constants.CKS_RW_USER_FUNCTIONS or PKCS11Constants.CKS_RW_SO_FUNCTIONS.
Preconditions
Postconditions

Method Detail

### clone

    public Object clone()

  Create a (deep) clone of this object.

  Returns:
    A clone of this object.
  Preconditions
  Postconditions
    (result <> null) and (result instanceof State) and (result.equals(this))

### equals

    public boolean equals(Object otherObject)

  Compares the state code of this object with the other object. Returns only true, if those are equal in both objects.

  Parameters:
    `otherObject` - The other State object.
  Returns:
    True, if other is an instance of State and the state code of both objects are equal. False, otherwise.
  Preconditions
  Postconditions

### hashCode

    public int hashCode()

  The overriding of this method should ensure that the objects of this class work correctly in a hashtable.

  Returns:
    The hash code of this object. Gained from the state code.
  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.