public abstract class DVBPKCS11Provider extends AuthProvider
Provider.Servicedefaults| Modifier | Constructor and Description |
|---|---|
protected |
DVBPKCS11Provider(String name,
double version,
String info,
AppID appID)
Creates a new instance of DVBPKCS11Provider
|
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getSlotId()
This method returns the PKCS11 slot identifier currently associated with this provider.
|
SlotInfo[] |
getSlotList(boolean tokenPresent)
This method is used to get the list of PKCS11 Slot available for this provider.
|
abstract TokenInfo |
getTokenInfo(int slotId)
This method is used to retreive information about a PKCS11 token in a given slot.
|
abstract void |
login(Principal identity,
CallbackHandler handler)
This method is used to explicitly log into a PKCS11 token.
|
abstract void |
logout()
This method is called to explicitly log out from a PKCS11 token.
|
abstract void |
setCallbackHandler(CallbackHandler handler)
This method is used to set a default callback handler for the provider.
|
abstract void |
setSlotId(int slotId)
This method can be used to change the slot identifier used by the provider.
|
clear, elements, entrySet, get, getInfo, getName, getProperty, getService, getServices, getVersion, keys, keySet, load, put, putAll, putService, remove, removeService, toString, valuesgetProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamesclone, contains, containsKey, containsValue, equals, hashCode, isEmpty, rehash, sizeprotected DVBPKCS11Provider(String name, double version, String info, AppID appID) throws SecurityException
SecurityException - when called with an appID not allowed by the DVBPKCS11 implementationpublic abstract int getSlotId()
public abstract void setSlotId(int slotId)
throws IOException,
IllegalArgumentException
slotId - a slot identifier.IOException - this exception is thrown if this method is called when the provider is
logged into the token.IllegalArgumentException - if the slot does not existpublic SlotInfo[] getSlotList(boolean tokenPresent)
tokenPresent - boolean indicating if the returned list includes only the slots with a
token present or all slots.public abstract TokenInfo getTokenInfo(int slotId) throws IllegalArgumentException
IllegalArgumentException - if the slot does not exist or there is no token in the slotpublic abstract void login(Principal identity, CallbackHandler handler) throws LoginException, NullPointerException
login in class AuthProvideridentity - This parameter is not used. It is kept to be compatible with the J2SE 5.0handler - This parameter is used to get the pin code needed to login. The callbackHandler
will get a PasswordCallback in which it should put the pin code.
This parameter may be null in which case the handler that was previously
set by setCallbackHandler is used.LoginException - This exception is under the conditions when C_Login would return an error return an error.NullPointerException - if the CallbackHandler parameter is null and either no
previous call to setCallbackHandler has occurred or the last call to that method set the handler to null.public abstract void logout()
throws LoginException
logout in class AuthProviderLoginException - This exception is thrown under the conditions when C_Logout would return an error.public abstract void setCallbackHandler(CallbackHandler handler)
setCallbackHandler in class AuthProviderhandler - a Callback handler that will be used to get the pin code when
the login method is called with a null handler.Copyright © 2012 code4tv.com. All Rights Reserved.