Safir SDK Core
|
Proxy class for a service request. More...
#include <Safir/Dob/ServiceRequestProxy.h>
Public Member Functions | |
const Dob::Typesystem::TypeId | GetTypeId () const |
Get type id. More... | |
const Dob::ServicePtr | GetRequest () const |
Get service request. More... | |
const Dob::ConnectionInfoPtr | GetSenderConnectionInfo () const |
Get info about the sender. More... | |
const Dob::Typesystem::HandlerId | GetReceivingHandlerId () const |
Get id of receiving handler. More... | |
const char * | GetBlob () const |
Get binary blob of the received service request. More... | |
ServiceRequestProxy (Internal::ServiceRequestProxyImpl *pImpl) | |
Trace and Debug stuff | |
const Dob::Typesystem::HandlerId | GetReceiverWithStringRepresentation () const |
Get receiver handler id that also contains the string representation. More... | |
Proxy class for a service request.
|
explicit |
const char* Safir::Dob::ServiceRequestProxy::GetBlob | ( | ) | const |
Get binary blob of the received service request.
This method will give you a pointer to the underlying representation of the object. Note that this pointer is only valid while the ServiceRequestProxy is in scope. If you want to keep the blob you must copy it using methods in Safir::Dob::Typesystem.
This method is mainly useful if all you want to do with a received object is to write it to a database or pass it over a C-interface to a library or plugin.
As an example, if you want to copy the bytes into a std::vector<char> you could do it like this "v = std::vector<char>(blob,blob+Safir::Dob::Typesystem::BlobOperations.GetSize())"
const Dob::Typesystem::HandlerId Safir::Dob::ServiceRequestProxy::GetReceiverWithStringRepresentation | ( | ) | const |
Get receiver handler id that also contains the string representation.
Mainly for trace and debug purposes.
const Dob::Typesystem::HandlerId Safir::Dob::ServiceRequestProxy::GetReceivingHandlerId | ( | ) | const |
Get id of receiving handler.
Can be handy when one consumer is used for several handlers.
const Dob::ServicePtr Safir::Dob::ServiceRequestProxy::GetRequest | ( | ) | const |
const Dob::ConnectionInfoPtr Safir::Dob::ServiceRequestProxy::GetSenderConnectionInfo | ( | ) | const |
Get info about the sender.
Retrieves a smart pointer to info about the connection sending the request.
const Dob::Typesystem::TypeId Safir::Dob::ServiceRequestProxy::GetTypeId | ( | ) | const |
Get type id.
Retrieves type id of the service request.