SpeasyProxyRequestManager.hh 1.33 KB
/*
 * SpeasyProxyRequestManager.hh
 *
 *  Created on: Dec 9, 2024
 *  Author: AKKA
 */

#ifndef SPEASYPROXYREQUESTMANAGER_HH_
#define SPEASYPROXYREQUESTMANAGER_HH_

#include <string>
#include <map>

#include "dsgpatt_Singleton.hh"
#include "SpeasyProxyRequest.hh"


namespace AMDA {
namespace SpeasyProxyInterface {

/**
 * @class SpeasyProxyRequestManager
 * @brief This Singleton contains and maintain a set of SpeasyProxyRequest object with key as speasyRequestId.
 */
class SpeasyProxyRequestManager : public ::Singleton<SpeasyProxyRequestManager>
{
public:

	typedef std::map<std::string,SpeasyProxyRequestWPtr> SpeasyProxyRequestMap;

	// Design pattern
	friend class Singleton<SpeasyProxyRequestManager>;

	/**
	 * @brief If the VI not exist, create it.
	 * @return a SharedPtr on a VirtualInstrument.
	 */
	SpeasyProxyRequestSPtr getSpeasyProxyRequest(const std::string& pSpeasyRequestId, SpeasyProxyParamType& paramType, int& dim1Size, int& dim2Size);

    std::string& getSpeasyProxyUrl(void);


private:
	SpeasyProxyRequestManager();

	virtual ~SpeasyProxyRequestManager();

	/*
	 * @brief SpeasyProxyRequest map
	 */
	SpeasyProxyRequestMap _speasyProxyRequestMap;

        /*
	 * @brief Speasy proxy entry point
	 */
	std::string _speasyProxyUrl;
};

} /* namespace SpeasyProxyInterface */
} /* namespace AMDA */

#endif /* SPEASYPROXYREQUESTMANAGER_HH_*/