Package org.xipki.pkcs11.wrapper
Class SessionInfo
- java.lang.Object
-
- org.xipki.pkcs11.wrapper.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 Summary
Constructors Modifier Constructor Description protectedSessionInfo(CK_SESSION_INFO ckSessionInfo)Constructor taking a CK_SESSION_INFO object that provides the information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDeviceError()Get the current device error-code of the token.longgetState()Get the current state of this session.booleanisRwSession()Check, if this is a read-write session.booleanisSerialSession()Check, if this is a serial session.StringtoString()Returns the string representation of this object.
-
-
-
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.
-
-