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 SlotInfo

    java.lang.Object
      iaik.pkcs.pkcs11.SlotInfo

public class SlotInfo
extends Object

Objects of this call provide information about a slot. A slot can be a smart card reader, for instancce. Notice that this object is immutable; i.e. it gets its state at object creation and does not alter afterwards. Thus, all information this object provides, is a snapshot at the object creation. This is especially important when calling isTokenPresent().

Invariants
  (slotDescription_ <> null) and (manufacturerID_ <> null) and (hardwareVersion_ <> null) and (firmwareVersion_ <> null)

Field Summary
`protected Version` | `firmwareVersion_` The version of the slot's firmware.
`protected Version` | `hardwareVersion_` The version of the slot's hardware.
`protected boolean` | `hwSlot_` Indicate, if this slot is a hardware device or if it is just pure software; i.e. no hardware involved, e.g. a softtoken.
`protected String` | `manufacturerID_` A string identifying the manufacturer of this slot.
`protected boolean` | `removableDevice_` Indicates, if the token's in this slot are removable or not.
`protected String` | `slotDescription_` A short descrption of this slot.
`protected boolean` | `tokenPresent_` Indicates, if a token is present.

Constructor Summary
`protected` | `SlotInfo(CK_SLOT_INFO ckSlotInfo)` Constructor that takes the CK_SLOT_INFO object as given by PKCS11.C_GetSlotInfo().

Method Summary
`boolean` | `equals(Object otherObject)` Compares all member variables of this object with the other object.
`Version` | `getFirmwareVersion()` Get the version of the slot's firmware.
`Version` | `getHardwareVersion()` Get the verion of the slot's hardware.
`String` | `getManufacturerID()` Get an identifier for the manufacturer of this slot.
`String` | `getSlotDescription()` Get a short description of this slot.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`boolean` | `isHwSlot()` Indicate, if the token is a hardware device or if it is just a pure software implementation; e.g. in case of a pure softwaretoken.
`boolean` | `isRemovableDevice()` Indicate, if the token is removalbe from this slot or not.
`boolean` | `isTokenPresent()` Indicates, if there is a token present in this slot.
`String` | `toString()` Returns the string representation of this object.

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

Field Detail

### slotDescription_

    protected String slotDescription_

  A short descrption of this slot.

### manufacturerID_

    protected String manufacturerID_

  A string identifying the manufacturer of this slot.

### hardwareVersion_

    protected Version hardwareVersion_

  The version of the slot's hardware.

### firmwareVersion_

    protected Version firmwareVersion_

  The version of the slot's firmware.

### tokenPresent_

    protected boolean tokenPresent_

  Indicates, if a token is present.

### removableDevice_

    protected boolean removableDevice_

  Indicates, if the token's in this slot are removable or not.

### hwSlot_

    protected boolean hwSlot_

  Indicate, if this slot is a hardware device or if it is just pure software; i.e. no hardware involved, e.g. a softtoken.

Constructor Detail

### SlotInfo

    protected SlotInfo(CK_SLOT_INFO ckSlotInfo)

  Constructor that takes the CK_SLOT_INFO object as given by PKCS11.C_GetSlotInfo().

Parameters:
  `ckSlotInfo` - The CK_SLOT_INFO object as given by PKCS11.C_GetSlotInfo().
Preconditions
  (ckSlotInfo <> null)
Postconditions

Method Detail

### getSlotDescription

    public String getSlotDescription()

  Get a short description of this slot.

  Returns:
    A string describing this slot.
  Preconditions
  Postconditions
    (result <> null)

### getManufacturerID

    public String getManufacturerID()

  Get an identifier for the manufacturer of this slot.

  Returns:
    A string identifying the manufacturer of this slot.
  Preconditions
  Postconditions
    (result <> null)

### getHardwareVersion

    public Version getHardwareVersion()

  Get the verion of the slot's hardware.

  Returns:
    The version of the hardware of this slot.
  Preconditions
  Postconditions
    (result <> null)

### getFirmwareVersion

    public Version getFirmwareVersion()

  Get the version of the slot's firmware.

  Returns:
    The version of the firmware of this slot.
  Preconditions
  Postconditions
    (result <> null)

### isTokenPresent

    public boolean isTokenPresent()

  Indicates, if there is a token present in this slot. Notice, that this refers to the time this object was created and not when this method is invoked.

  Returns:
    True, if there is a (compatible) token in the slot. False, otherwise.
  Preconditions
  Postconditions

### isRemovableDevice

    public boolean isRemovableDevice()

  Indicate, if the token is removalbe from this slot or not. In some cases slot and token will be one device.

  Returns:
    True, if the tokens are removable. False, otherwise.
  Preconditions
  Postconditions

### isHwSlot

    public boolean isHwSlot()

  Indicate, if the token is a hardware device or if it is just a pure software implementation; e.g. in case of a pure softwaretoken.

  Returns:
    True, if it is a hardware slot. False, otherwise.
  Preconditions
  Postconditions

### toString

    public String toString()

  Returns the string representation of this object.

  Returns:
    the string representation of object

### equals

    public boolean equals(Object otherObject)

  Compares all member variables of this object with the other object. Returns only true, if all are equal in both objects.

  Parameters:
    `otherObject` - The other SlotInfo object.
  Returns:
    True, if other is an instance of Info and all member variables 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 slotDescription_, manufacturerID_, hardwareVersion_ and firmwareVersion_.
  Preconditions
  Postconditions

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.