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 SlotInfo

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

public class SlotInfo
extends java.lang.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().

Version:
  1.0
Author:
  Karl Scheibelhofer

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.
`protected java.lang.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 java.lang.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(java.lang.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.
`java.lang.String` | `getManufacturerID()` Get an identifier for the manufacturer of this slot.
`java.lang.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.
`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.
`java.lang.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 java.lang.String slotDescription_

  A short descrption of this slot.

### manufacturerID_

    protected java.lang.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().

Method Detail

### getSlotDescription

    public java.lang.String getSlotDescription()

  Get a short description of this slot.
  Returns:
    A string describing this slot.

### getManufacturerID

    public java.lang.String getManufacturerID()

  Get an identifier for the manufacturer of this slot.
  Returns:
    A string identifying the manufacturer of this slot.

### getHardwareVersion

    public Version getHardwareVersion()

  Get the verion of the slot's hardware.
  Returns:
    The version of the hardware of this slot.

### getFirmwareVersion

    public Version getFirmwareVersion()

  Get the version of the slot's firmware.
  Returns:
    The version of the firmware of this slot.

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

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

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

### 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 SlotInfo 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 slotDescription_, manufacturerID_, hardwareVersion_ and firmwareVersion_.

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