Package org.xipki.security.pkcs11
Class P11Module
- java.lang.Object
-
- org.xipki.security.pkcs11.P11Module
-
- Direct Known Subclasses:
NativeP11Module
public abstract class P11Module extends Object
PKCS#11 module.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Field Summary
Fields Modifier and Type Field Description protected P11ModuleConfconf
-
Constructor Summary
Constructors Constructor Description P11Module(P11ModuleConf conf)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()P11ModuleConfgetConf()abstract StringgetDescription()StringgetName()P11SlotgetSlot(P11SlotId slotId)Returns slot for the givenslotId.P11SlotIdgetSlotIdForId(long id)P11SlotIdgetSlotIdForIndex(int index)List<P11SlotId>getSlotIds()booleanisReadOnly()protected voidsetSlots(Set<P11Slot> slots)
-
-
-
Field Detail
-
conf
protected final P11ModuleConf conf
-
-
Constructor Detail
-
P11Module
public P11Module(P11ModuleConf conf)
-
-
Method Detail
-
close
public abstract void close()
-
getDescription
public abstract String getDescription()
-
getName
public String getName()
-
isReadOnly
public boolean isReadOnly()
-
getConf
public P11ModuleConf getConf()
-
getSlot
public P11Slot getSlot(P11SlotId slotId) throws org.xipki.pkcs11.wrapper.TokenException
Returns slot for the givenslotId.- Parameters:
slotId- slot identifier. Must not benull.- Returns:
- the slot
- Throws:
org.xipki.pkcs11.wrapper.TokenException- if PKCS#11 token error occurs
-
getSlotIdForIndex
public P11SlotId getSlotIdForIndex(int index) throws org.xipki.pkcs11.wrapper.TokenException
- Throws:
org.xipki.pkcs11.wrapper.TokenException
-
getSlotIdForId
public P11SlotId getSlotIdForId(long id) throws org.xipki.pkcs11.wrapper.TokenException
- Throws:
org.xipki.pkcs11.wrapper.TokenException
-
-