public class SamResourceManagerPool extends SamResourceManager
PoolPluginSamResourceManager.AllocationMode| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.keyple.core.service.Plugin |
samReaderPlugin
Deprecated.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SamResourceManagerPool(org.eclipse.keyple.core.service.PoolPlugin samPoolPlugin,
int maxBlockingTime,
int sleepTime)
Deprecated.
Protected constructor, use the
SamResourceManagerFactory |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.keyple.core.card.selection.CardResource<CalypsoSam> |
allocateSamResource(SamResourceManager.AllocationMode allocationMode,
SamIdentifier samIdentifier)
Deprecated.
Allocate a SAM resource from the specified SAM group.
|
void |
freeSamResource(org.eclipse.keyple.core.card.selection.CardResource<CalypsoSam> samResource)
Deprecated.
Free a previously allocated SAM resource.
|
createSamResourceprotected final org.eclipse.keyple.core.service.Plugin samReaderPlugin
protected SamResourceManagerPool(org.eclipse.keyple.core.service.PoolPlugin samPoolPlugin,
int maxBlockingTime,
int sleepTime)
SamResourceManagerFactorysamPoolPlugin - the reader pool pluginmaxBlockingTime - the maximum duration for which the allocateSamResource method will
attempt to allocate a new reader by retrying (in milliseconds).sleepTime - the duration to wait between two retriespublic org.eclipse.keyple.core.card.selection.CardResource<CalypsoSam> allocateSamResource(SamResourceManager.AllocationMode allocationMode, SamIdentifier samIdentifier)
In the case where the allocation mode is BLOCKING, this method will wait until a SAM resource becomes free and then return the reference to the allocated resource. However, the BLOCKING mode will wait a maximum time defined in milliseconds by MAX_BLOCKING_TIME.
In the case where the allocation mode is NON_BLOCKING and no SAM resource is available, this method will return an exception.
If the samGroup argument is null, the first available SAM resource will be selected and returned regardless of its group.
allocateSamResource in class SamResourceManagerallocationMode - the blocking/non-blocking modesamIdentifier - the targeted SAM identifierpublic void freeSamResource(org.eclipse.keyple.core.card.selection.CardResource<CalypsoSam> samResource)
SamResourceManagerfreeSamResource in class SamResourceManagersamResource - the SAM resource reference to free