public class Storage extends PKCS11Object
PKCS11Object.ObjectClass, PKCS11Object.VendorDefinedObjectBuilder| Modifier and Type | Field and Description |
|---|---|
protected CharArrayAttribute |
label
The label of this object.
|
protected BooleanAttribute |
modifiable
True, if this object is modifiable.
|
protected BooleanAttribute |
private_
True, if this is a private object.
|
protected BooleanAttribute |
token
True, if object is a token object (not a session object).
|
attributeTable, objectClass, objectClassNames, objectHandle, vendorObjectBuilder| Modifier | Constructor and Description |
|---|---|
|
Storage()
The default constructor.
|
protected |
Storage(Session session,
long objectHandle)
Constructor taking the reference to the PKCS#11 module for accessing the
object's attributes, the session handle to use for reading the attribute
values and the object handle.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocateAttributes()
Allocates the attribute objects for this class and adds them to the
attribute table.
|
boolean |
equals(Object otherObject)
Compares all member variables of this object with the other object.
|
CharArrayAttribute |
getLabel()
Get the label attribute of this object.
|
BooleanAttribute |
getModifiable()
Check, if this is a modifiable object.
|
BooleanAttribute |
getPrivate()
Check, if this is a private object.
|
BooleanAttribute |
getToken()
Check, if this is a token object.
|
int |
hashCode()
The overriding of this method should ensure that the objects of this
class work correctly in a hashtable.
|
protected static void |
putAttributesInTable(Storage object)
Put all attributes of the given object into the attributes table of this
object.
|
void |
readAttributes(Session session)
Read the values of the attributes of this object from the token.
|
String |
toString()
Returns a string representation of the current object.
|
getAttribute, getAttributeTable, getAttributeValue, getAttributeValues, getInstance, getObjectClass, getObjectClassName, getObjectHandle, getSetAttributes, getSetAttributes, getUnknownObject, getVendorDefinedObjectBuilder, putAttribute, putAttributesInTable, removeAttribute, setObjectHandle, setVendorDefinedObjectBuilder, toStringprotected BooleanAttribute token
protected BooleanAttribute private_
protected BooleanAttribute modifiable
protected CharArrayAttribute label
public Storage()
protected Storage(Session session, long objectHandle) throws TokenException
session - The session to use for reading attributes. This session must
have the appropriate rights; i.e. it must be a user-session, if
it is a private object.objectHandle - The object handle as given from the PKCS#111 module.TokenException - If getting the attributes failed.protected static void putAttributesInTable(Storage object)
object - The object to handle.protected void allocateAttributes()
allocateAttributes in class PKCS11Objectpublic boolean equals(Object otherObject)
equals in class PKCS11ObjectotherObject - The other object to compare to.public BooleanAttribute getToken()
public BooleanAttribute getPrivate()
public BooleanAttribute getModifiable()
public CharArrayAttribute getLabel()
public void readAttributes(Session session) throws TokenException
readAttributes in class PKCS11Objectsession - The session to use for reading attributes. This session must
have the appropriate rights; i.e. it must be a user-session, if
it is a private object.TokenException - If getting the attributes failed.public String toString()
toString in class PKCS11Objectpublic int hashCode()
hashCode in class PKCS11ObjectCopyright © 2018. All rights reserved.