FETPAPI 0.6.0.0
This project provides C++ classes which facilitate the developement of ETP1.2 clients and servers.
Loading...
Searching...
No Matches
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
void run ()
void on_resolve (boost::system::error_code ec, tcp::resolver::results_type results)
virtual void asyncConnect (const 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 setCoreOSDUProtocolHandlers (std::shared_ptr< CoreOSDUHandlers > coreOSDUHandlers)
FETPAPI_DLL_IMPORT_OR_EXPORT void setStoreOSDUProtocolHandlers (std::shared_ptr< StoreOSDUHandlers > storeOSDUHandlers)
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)
int64_t send (std::shared_ptr< EtpMessage > message, int64_t correlationId=0, int32_t messageFlags=0, const std::vector< int64_t > &msgIdAliases={})
int64_t sendAndBlock (std::shared_ptr< EtpMessage > message, int64_t correlationId=0, int32_t messageFlags=0, const std::vector< int64_t > &msgIdAliases={})
int64_t sendWithSpecificHandler (std::shared_ptr< EtpMessage > message, std::shared_ptr< ETP_NS::ProtocolHandlers > specificHandler, int64_t correlationId=0, int32_t messageFlags=0, const std::vector< int64_t > &msgIdAliases={})
int64_t sendWithSpecificHandlerAndBlock (std::shared_ptr< EtpMessage > message, std::shared_ptr< ETP_NS::ProtocolHandlers > specificHandler, int64_t correlationId=0, int32_t messageFlags=0, const std::vector< int64_t > &msgIdAliases={})
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_close (boost::system::error_code ec)
FETPAPI_DLL_IMPORT_OR_EXPORT bool isCloseRequested () const
FETPAPI_DLL_IMPORT_OR_EXPORT bool isWebSocketSessionClosed () const
FETPAPI_DLL_IMPORT_OR_EXPORT bool isMessageStillProcessing (int64_t msgId)
virtual void setMaxWebSocketMessagePayloadSize (uint64_t value)=0
uint64_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
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 > lockDataspaces (const std::map< std::string, std::string > &dataspaceUris, bool lock)
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 > copyToDataspace (const std::map< std::string, std::string > &sourceDataobjectUris, 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::vector< std::string > copyDataObjectsByValue (const std::string &sourceDataobjectUri, int32_t sourcesDepth=0, const std::vector< std::string > &dataObjectTypes={})
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)

Member Function Documentation

◆ getIoContext()

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

◆ run()

void 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: