PCSC4Java
0.2
Library PCSC for Java language.
|
Classes | |
class | NoneCardTerminals |
class | NoneFactorySpi |
class | NoneProvider |
Public Member Functions | |
void | releaseContext () |
Provider | getProvider () |
String | getType () |
CardTerminals | terminals () |
String | toString () |
Static Public Member Functions | |
static void | setPnPCallback (CardTerminalsEvent cardTerminalsEvent) |
static void | removePnPCallback (CardTerminalsEvent cardTerminalsEvent) |
static List | getPnPCallbacks () |
static String | getDefaultType () |
static TerminalFactory | getDefault () |
static TerminalFactory | getInstance (String type, Object params) throws NoSuchAlgorithmException |
static TerminalFactory | getInstance (String type, Object params, String provider) throws NoSuchAlgorithmException, NoSuchProviderException |
static TerminalFactory | getInstance (String type, Object params, Provider provider) throws NoSuchAlgorithmException |
A factory for CardTerminal objects.
It allows an application to
Each TerminalFactory has a type
indicating how it was implemented. It must be specified when the implementation is obtained using a getInstance getInstance()} method and can be retrieved via the getType} method.
The following standard type names have been defined:
PC/SC
None
None
and getDefault} returns an instance of a None
TerminalFactory. Factories of this type cannot be obtained by calling the getInstance()
methods. Additional standard types may be defined in the future.
Note: Provider implementations that accept initialization parameters via the getInstance()
methods are strongly encouraged to use a java.util.Properties} object as the representation for String name-value pair based parameters whenever possible. This allows applications to more easily interoperate with multiple providers than if each provider used different provider specific class as parameters.
TerminalFactory utilizes an extensible service provider framework. Service providers that wish to add a new implementation should see the TerminalFactorySpi} class for more information.
Definition at line 92 of file TerminalFactory.java.
static TerminalFactory fr.redbilled.pcscforjava.TerminalFactory.getDefault | ( | ) | [static] |
Returns the default TerminalFactory instance. See getDefaultType} for more information.
A default TerminalFactory is always available. However, depending on the implementation, it may not offer any terminals.
Definition at line 262 of file TerminalFactory.java.
static String fr.redbilled.pcscforjava.TerminalFactory.getDefaultType | ( | ) | [static] |
Get the default TerminalFactory type.
It is determined as follows:
when this class is initialized, the system property javax.smartcardio.TerminalFactory.DefaultType
is examined. If it is set, a TerminalFactory of this type is instantiated by calling the getInstance getInstance(String,Object)} method passing null
as the value for params
. If the call succeeds, the type becomes the default type and the factory becomes the getDefault default} factory.
If the system property is not set or the getInstance() call fails for any reason, the system defaults to an implementation specific default type and TerminalFactory.
Definition at line 249 of file TerminalFactory.java.
static TerminalFactory fr.redbilled.pcscforjava.TerminalFactory.getInstance | ( | String | type, |
Object | params | ||
) | throws NoSuchAlgorithmException [static] |
Returns a TerminalFactory of the specified type that is initialized with the specified parameters.
This method traverses the list of registered security Providers, starting with the most preferred Provider. A new TerminalFactory object encapsulating the TerminalFactorySpi implementation from the first Provider that supports the specified type is returned.
Note that the list of registered providers may be retrieved via the Security::getProviders() Security.getProviders()} method.
The TerminalFactory
is initialized with the specified parameters Object. The type of parameters needed may vary between different types of TerminalFactory
s.
type | the type of the requested TerminalFactory |
params | the parameters to pass to the TerminalFactorySpi implementation, or null if no parameters are needed |
NullPointerException | if type is null |
NoSuchAlgorithmException | if no Provider supports a TerminalFactorySpi of the specified type |
Definition at line 292 of file TerminalFactory.java.
static TerminalFactory fr.redbilled.pcscforjava.TerminalFactory.getInstance | ( | String | type, |
Object | params, | ||
String | provider | ||
) | throws NoSuchAlgorithmException, NoSuchProviderException [static] |
Returns a TerminalFactory of the specified type that is initialized with the specified parameters.
A new TerminalFactory object encapsulating the TerminalFactorySpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list.
Note that the list of registered providers may be retrieved via the Security::getProviders() Security.getProviders()} method.
The TerminalFactory
is initialized with the specified parameters Object. The type of parameters needed may vary between different types of TerminalFactory
s.
type | the type of the requested TerminalFactory |
params | the parameters to pass to the TerminalFactorySpi implementation, or null if no parameters are needed |
provider | the name of the provider |
NullPointerException | if type is null |
IllegalArgumentException | if provider is null or the empty String |
NoSuchAlgorithmException | if a TerminalFactorySpi implementation of the specified type is not available from the specified provider |
NoSuchAlgorithmException | if no TerminalFactory of the specified type could be found |
NoSuchProviderException | if the specified provider could not be found |
Definition at line 332 of file TerminalFactory.java.
static TerminalFactory fr.redbilled.pcscforjava.TerminalFactory.getInstance | ( | String | type, |
Object | params, | ||
Provider | provider | ||
) | throws NoSuchAlgorithmException [static] |
Returns a TerminalFactory of the specified type that is initialized with the specified parameters.
A new TerminalFactory object encapsulating the TerminalFactorySpi implementation from the specified provider object is returned. Note that the specified provider object does not have to be registered in the provider list.
The TerminalFactory
is initialized with the specified parameters Object. The type of parameters needed may vary between different types of TerminalFactory
s.
type | the type of the requested TerminalFactory |
params | the parameters to pass to the TerminalFactorySpi implementation, or null if no parameters are needed |
provider | the provider |
NullPointerException | if type is null |
IllegalArgumentException | if provider is null |
NoSuchAlgorithmException | if a TerminalFactorySpi implementation of the specified type is not available from the specified Provider |
Definition at line 364 of file TerminalFactory.java.
static List fr.redbilled.pcscforjava.TerminalFactory.getPnPCallbacks | ( | ) | [static] |
Definition at line 150 of file TerminalFactory.java.
Provider fr.redbilled.pcscforjava.TerminalFactory.getProvider | ( | ) |
Returns the provider of this TerminalFactory.
Definition at line 377 of file TerminalFactory.java.
Returns the type of this TerminalFactory. This is the value that was specified in the getInstance() method that returned this object.
Definition at line 387 of file TerminalFactory.java.
static void fr.redbilled.pcscforjava.TerminalFactory.removePnPCallback | ( | CardTerminalsEvent | cardTerminalsEvent | ) | [static] |
Definition at line 138 of file TerminalFactory.java.
static void fr.redbilled.pcscforjava.TerminalFactory.setPnPCallback | ( | CardTerminalsEvent | cardTerminalsEvent | ) | [static] |
Definition at line 133 of file TerminalFactory.java.
Returns a new CardTerminals object encapsulating the terminals supported by this factory. See the class comment of the CardTerminals} class regarding how the returned objects can be shared and reused.
Definition at line 400 of file TerminalFactory.java.
Returns a string representation of this TerminalFactory.
Definition at line 409 of file TerminalFactory.java.