Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | List of all members
keyple::core::seproxy::ReaderPoolPlugin Class Referenceabstract

#include <ReaderPoolPlugin.h>

Inherits keyple::core::seproxy::ReaderPlugin.

Inherited by keyple::plugin::stub::StubPoolPlugin.

Public Member Functions

virtual std::set< std::string > getReaderGroupReferences ()=0
 
virtual std::shared_ptr< SeReaderallocateReader (const std::string &groupReference)=0
 
virtual void releaseReader (std::shared_ptr< SeReader > seReader)=0
 
- Public Member Functions inherited from keyple::core::seproxy::ReaderPlugin
virtual ~ReaderPlugin ()=default
 
virtual const std::set< std::string > getReaderNames () const =0
 
virtual ConcurrentMap< const std::string, std::shared_ptr< SeReader > > & getReaders ()=0
 
virtual const std::shared_ptr< SeReadergetReader (const std::string &name)=0
 
- Public Member Functions inherited from keyple::core::seproxy::ProxyElement
virtual ~ProxyElement ()=default
 
virtual const std::string & getName () const =0
 
virtual const std::map< const std::string, const std::string > & getParameters () const =0
 
virtual void setParameter (const std::string &key, const std::string &value)=0
 
virtual void setParameters (const std::map< const std::string, const std::string > &parameters)
 

Detailed Description

The ReaderPoolPlugin interface provides methods to handle the access to an undefined number of SeReader resources.

It is typically used to define a ReaderPlugin built on top of an HSM interface that can allocate a large number of virtual reader slots.

A ReaderPoolPlugin can't be observable.

Member Function Documentation

◆ allocateReader()

virtual std::shared_ptr<SeReader> keyple::core::seproxy::ReaderPoolPlugin::allocateReader ( const std::string &  groupReference)
pure virtual

Obtains an available SeReader resource and makes it exclusive to the caller until the releaseReader method is called.

The allocated reader belongs to the group targeted with provided reference.

Parameters
groupReferencethe reference of the group to which the reader belongs (may be null depending on the implementation made)
Returns
a SeReader object
Exceptions
KeypleAllocationReaderExceptionif the allocation failed

Implemented in keyple::plugin::stub::StubPoolPluginImpl.

◆ getReaderGroupReferences()

virtual std::set<std::string> keyple::core::seproxy::ReaderPoolPlugin::getReaderGroupReferences ( )
pure virtual

Gets a list of group references that will be used as an argument to allocateReader.

A group reference can represent a family of SeReader with all the same characteristics (e.g. SAM with identical key sets).

Returns
a list of String

Implemented in keyple::plugin::stub::StubPoolPluginImpl.

◆ releaseReader()

virtual void keyple::core::seproxy::ReaderPoolPlugin::releaseReader ( std::shared_ptr< SeReader seReader)
pure virtual

Releases a SeReader previously allocated with allocateReader.

This method must be called as soon as the reader is no longer needed by the caller of allocateReader in order to free the resource.

Parameters
seReaderthe SeReader to be released.

Implemented in keyple::plugin::stub::StubPoolPluginImpl.


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