Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Static Public Member Functions | List of all members
keyple::calypso::transaction::SamResourceManagerFactory Class Reference

#include <SamResourceManagerFactory.h>

Static Public Member Functions

static std::shared_ptr< SamResourceManagerinstantiate (const std::shared_ptr< ReaderPlugin > readerPlugin, const std::string &samReaderFilter, const int maxBlockingTime, const int sleepTime)
 
static std::shared_ptr< SamResourceManagerinstantiate (const std::shared_ptr< ReaderPlugin > readerPlugin, const std::string &samReaderFilter)
 
static std::shared_ptr< SamResourceManagerinstantiate (ReaderPoolPlugin &samReaderPoolPlugin, const int maxBlockingTime, const int sleepTime)
 
static std::shared_ptr< SamResourceManagerinstantiate (ReaderPoolPlugin &samReaderPoolPlugin)
 

Detailed Description

Factory that builds a SamResourceManager depending on the plugin used

Member Function Documentation

◆ 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
readerPluginthe plugin through which SAM readers are accessible
samReaderFilterthe regular expression defining how to identify SAM readers among others.
maxBlockingTimethe maximum duration for which the allocateSamResource method will attempt to allocate a new reader by retrying (in milliseconds).
sleepTimethe duration to wait between two retries
Exceptions
KeypleReaderExceptionthrow if an error occurs while getting the readers list.
Returns
SamResourceManager working with a default plugin

◆ instantiate() [3/4]

std::shared_ptr< SamResourceManager > keyple::calypso::transaction::SamResourceManagerFactory::instantiate ( ReaderPoolPlugin samReaderPoolPlugin)
static

◆ 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
samReaderPoolPluginthe plugin through which SAM readers are accessible
maxBlockingTimethe maximum duration for which the allocateSamResource method will attempt to allocate a new reader by retrying (in milliseconds).
sleepTimethe duration to wait between two retries
Returns
SamResourceManager working with a pool plugin

The documentation for this class was generated from the following files: