Class SessionInfo


  • public class SessionInfo
    extends Object
    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.
    Author:
    Karl Scheibelhofer (SIC), Lijun Liao (xipki)
    • Constructor Detail

      • SessionInfo

        protected SessionInfo​(CK_SESSION_INFO ckSessionInfo)
        Constructor taking a CK_SESSION_INFO object that provides the information.
        Parameters:
        ckSessionInfo - The object providing the session information.
    • Method Detail

      • getState

        public long 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; false, if this is a parallel session. Should always be true for version 2.x of the PKCS#11 standard.
      • toString

        public String toString()
        Returns the string representation of this object.
        Overrides:
        toString in class Object
        Returns:
        The string representation of object