#include <SamResourceManagerFactory.h>
Factory that builds a SamResourceManager depending on the plugin used
◆ instantiate() [1/4]
std::shared_ptr< SamResourceManager > keyple::calypso::transaction::SamResourceManagerFactory::instantiate |
( |
const std::shared_ptr< ReaderPlugin > |
readerPlugin, |
|
|
const std::string & |
samReaderFilter |
|
) |
| |
|
static |
◆ instantiate() [2/4]
std::shared_ptr< SamResourceManager > keyple::calypso::transaction::SamResourceManagerFactory::instantiate |
( |
const std::shared_ptr< ReaderPlugin > |
readerPlugin, |
|
|
const std::string & |
samReaderFilter, |
|
|
const int |
maxBlockingTime, |
|
|
const int |
sleepTime |
|
) |
| |
|
static |
Instantiate a new SamResourceManager.
The samReaderPlugin is used to retrieve the available SAM according to the provided filter.
Setup a plugin observer if the reader plugin is observable.
- Parameters
-
readerPlugin | the plugin through which SAM readers are accessible |
samReaderFilter | the regular expression defining how to identify SAM readers among others. |
maxBlockingTime | 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 retries |
- Exceptions
-
KeypleReaderException | throw if an error occurs while getting the readers list. |
- Returns
- SamResourceManager working with a default plugin
◆ instantiate() [3/4]
◆ instantiate() [4/4]
std::shared_ptr< SamResourceManager > keyple::calypso::transaction::SamResourceManagerFactory::instantiate |
( |
ReaderPoolPlugin & |
samReaderPoolPlugin, |
|
|
const int |
maxBlockingTime, |
|
|
const int |
sleepTime |
|
) |
| |
|
static |
Instantiate a new SamResourceManager.
The samReaderPlugin is used to retrieve the available SAM in the ReaderPoolPlugin.
Setup a plugin observer if the reader plugin is observable.
- Parameters
-
samReaderPoolPlugin | the plugin through which SAM readers are accessible |
maxBlockingTime | 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 retries |
- Returns
- SamResourceManager working with a pool plugin
The documentation for this class was generated from the following files: