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

## iaik.pkcs.pkcs11
Class SessionInfo

    java.lang.Object
      |
      +--iaik.pkcs.pkcs11.SessionInfo

All Implemented Interfaces:
  java.lang.Cloneable

public class SessionInfo
extends java.lang.Object
implements java.lang.Cloneable

An object of this class provides information about a session. The information provided is just a snapshot at the time this information object was created; it does not retrieve the information from the session on demand.

Version:
  1.0
Author:
  Karl Scheibelhofer

Field Summary
`protected long` | `deviceError_` An token specific error-code.
`protected boolean` | `rwSession_` True, if this is a read-write session.
`protected boolean` | `serialSession_` True, if this a serial session.
`protected long` | `slotID_` The identifier of the slot in which the token resides this session is bound to.
`protected State` | `state_` The current session state.

Constructor Summary
`protected` | `SessionInfo(CK_SESSION_INFO ckSessionInfo)` Constructor taking a CK_SESSION_INFO object that provides the infromation.

Method Summary
`java.lang.Object` | `clone()` Create a (deep) clone of this object.
`boolean` | `equals(java.lang.Object otherObject)` Compares all member variables of this object with the other object.
`long` | `getDeviceError()` Get the current device error-code of the token.
`State` | `getState()` Get the current state of this session.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`boolean` | `isRwSession()` Check, if this is a read-write session.
`boolean` | `isSerialSession()` Check, if this is a serial session.
`java.lang.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

### slotID_

    protected long slotID_

  The identifier of the slot in which the token resides this session is bound to.

### state_

    protected State state_

  The current session state.

### deviceError_

    protected long deviceError_

  An token specific error-code. The meaning of this value is not defined in PKCS#11.

### rwSession_

    protected boolean rwSession_

  True, if this is a read-write session.

### serialSession_

    protected boolean serialSession_

  True, if this a serial session. Always true, for this version of PKCS#11.

Constructor Detail

### SessionInfo

    protected SessionInfo(CK_SESSION_INFO ckSessionInfo)

  Constructor taking a CK_SESSION_INFO object that provides the infromation.
  Parameters:
    `ckSessionInfo` - The object providing the session information.

Method Detail

### clone

    public java.lang.Object clone()

  Create a (deep) clone of this object.
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    A clone of this object.

### getState

    public State getState()

  Get the current state of this session.
  Returns:
    The current state of this session.

### getDeviceError

    public long getDeviceError()

  Get the current device error-code of the token. Notice that this code is device-specific. Its meaning is not defined in the PKCS#11 standard.
  Returns:
    The error-code of the device.

### isRwSession

    public boolean isRwSession()

  Check, if this is a read-write session.
  Returns:
    True, if this is a read-write session; false, if this is a read-only session.

### isSerialSession

    public boolean isSerialSession()

  Check, if this is a serial session. Should always be true for version 2.x of the PKCS#11 standard.
  Returns:
    True, if this is a serial session; flase, if this is a parallel session. Should always be true for version 2.x of the PKCS#11 standard..

### 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

### equals

    public boolean equals(java.lang.Object otherObject)

  Compares all member variables of this object with the other object. Returns only true, if all are equal in both objects.
  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `otherObject` - The other SessionInfo object.
  Returns:
    True, if other is an instance of Info and all member variables of both objects are equal. False, otherwise.

### hashCode

    public int hashCode()

  The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    The hash code of this object. Gained from the slotID_, state_ and deviceError_.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.18
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | 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-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.2.18