FETPAPI 0.3.0.0
This project provides C++ classes which facilitate the developement of ETP1.2 clients and servers.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ETP_NS::ClientSession Class Referenceabstract
Inheritance diagram for ETP_NS::ClientSession:
ETP_NS::AbstractSession ETP_NS::AbstractClientSessionCRTP< PlainClientSession > ETP_NS::AbstractClientSessionCRTP< SslClientSession > ETP_NS::AbstractClientSessionCRTP< Derived > ETP_NS::PlainClientSession ETP_NS::SslClientSession

Public Member Functions

boost::asio::io_context & getIoContext ()
 
const std::string & getEtpServerHost () const
 
const std::string & getEtpServerPort () const
 
const std::string & getEtpServerTarget () const
 
const std::string & getEtpServerAuthorization () const
 
const std::string & getProxyHost () const
 
const std::string & getProxyPort () const
 
const std::string & getProxyAuthorization () const
 
bool run ()
 
virtual void on_resolve (boost::system::error_code ec, tcp::resolver::results_type results)=0
 
virtual bool isTls () const =0
 
void on_handshake (boost::system::error_code ec)
 
- Public Member Functions inherited from ETP_NS::AbstractSession
const boost::uuids::uuid & getIdentifier ()
 
void setTimeOut (double timeOut)
 
double getTimeOut () const
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setCoreProtocolHandlers (std::shared_ptr< CoreHandlers > coreHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setDiscoveryProtocolHandlers (std::shared_ptr< DiscoveryHandlers > discoveryHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setStoreProtocolHandlers (std::shared_ptr< StoreHandlers > storeHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setStoreNotificationProtocolHandlers (std::shared_ptr< ETP_NS::StoreNotificationHandlers > storeNotificationHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setDataArrayProtocolHandlers (std::shared_ptr< DataArrayHandlers > dataArrayHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setTransactionProtocolHandlers (std::shared_ptr< TransactionHandlers > transactionHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setDataspaceProtocolHandlers (std::shared_ptr< DataspaceHandlers > dataspaceHandlers)
 
FETPAPI_DLL_IMPORT_OR_EXPORT void setDataspaceOSDUProtocolHandlers (std::shared_ptr< DataspaceOSDUHandlers > dataspaceOsduHandlers)
 
template<typename T >
int64_t send (const T &mb, int64_t correlationId=0, int32_t messageFlags=0)
 
template<typename T >
void sendAndBlock (const T &mb, int64_t correlationId=0, int32_t messageFlags=0)
 
template<typename T >
int64_t sendWithSpecificHandler (const T &mb, std::shared_ptr< ETP_NS::ProtocolHandlers > specificHandler, int64_t correlationId=0, int32_t messageFlags=0)
 
virtual void do_close ()=0
 
virtual void do_read ()=0
 
FETPAPI_DLL_IMPORT_OR_EXPORT void on_read (boost::system::error_code ec, std::size_t bytes_transferred)
 
void on_write (boost::system::error_code ec, std::size_t)
 
void on_close (boost::system::error_code ec)
 
FETPAPI_DLL_IMPORT_OR_EXPORT bool isWebSocketSessionClosed () const
 
FETPAPI_DLL_IMPORT_OR_EXPORT bool isMessageStillProcessing (int64_t msgId)
 
virtual void setMaxWebSocketMessagePayloadSize (int64_t value)=0
 
int64_t getMaxWebSocketMessagePayloadSize () const
 
FETPAPI_DLL_IMPORT_OR_EXPORT void close ()
 
FETPAPI_DLL_IMPORT_OR_EXPORT void closeAndBlock ()
 
FETPAPI_DLL_IMPORT_OR_EXPORT bool isEtpSessionClosed () const
 
void setEtpSessionClosed (bool etpSessionClosed_)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< Energistics::Etp::v12::Datatypes::Object::DataspacegetDataspaces (int64_t storeLastWriteFilter=-1)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > putDataspaces (const std::map< std::string, Energistics::Etp::v12::Datatypes::Object::Dataspace > &dataspaces)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > deleteDataspaces (const std::map< std::string, std::string > &dataspaceUris)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< Energistics::Etp::v12::Datatypes::Object::DataspacegetDataspaceInfo (const std::map< std::string, std::string > &dataspaceUris)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > copyDataspacesContent (const std::map< std::string, std::string > &sourceDataspaceUris, const std::string &targetDataspaceUri)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > lockDataspaces (const std::map< std::string, std::string > &dataspaceUris, bool lock)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > copyToDataspace (const std::map< std::string, std::string > &sourceUris, const std::string &targetDataspaceUri)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< Energistics::Etp::v12::Datatypes::Object::ResourcegetResources (const Energistics::Etp::v12::Datatypes::Object::ContextInfo &context, const Energistics::Etp::v12::Datatypes::Object::ContextScopeKind &scope, int64_t storeLastWriteFilter=-1, bool countObjects=false)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< Energistics::Etp::v12::Datatypes::Object::DeletedResourcegetDeletedResources (const std::string &dataspaceUri, int64_t deleteTimeFilter=-1, const std::vector< std::string > &dataObjectTypes={})
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::map< std::string, Energistics::Etp::v12::Datatypes::Object::DataObjectgetDataObjects (const std::map< std::string, std::string > &uris)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > putDataObjects (const std::map< std::string, Energistics::Etp::v12::Datatypes::Object::DataObject > &dataObjects)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::vector< std::string > deleteDataObjects (const std::map< std::string, std::string > &uris)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::string startTransaction (std::vector< std::string > dataspaceUris={}, bool readOnly=false)
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::string rollbackTransaction ()
 
FETPAPI_DLL_IMPORT_OR_EXPORT std::string commitTransaction ()
 
void setVerbose (bool verbose)
 
void fesapi_log ()
 
template<typename First , typename ... Rest>
void fesapi_log (First &&first, Rest &&...rest)
 

Additional Inherited Members

- Public Attributes inherited from ETP_NS::AbstractSession
std::unordered_map< int64_t, Energistics::Etp::v12::Datatypes::Object::SubscriptionInfosubscriptions
 

Member Function Documentation

◆ getIoContext()

boost::asio::io_context & ETP_NS::ClientSession::getIoContext ( )
inlinevirtual

◆ run()

bool ETP_NS::ClientSession::run ( )
inline

Run the websocket and then the ETP session in a processing loop. Everything related to this session (including the completion handlers) will operate on the current thread in a single event loop. Since this is a loop, you may want to operate this method on a dedicated thread not to block your program. This method returns only when the session is closed.


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