Library: Remoting
Package: Transport
Header: Poco/Remoting/Transport.h
Interface for all Transport implementations. Note that remote execution is split up in three phases:
1. prepareExecute
2. execute
3. endExecute
When one executes one-way, the last phase is optional.
Known Derived Classes: Poco::Remoting::Binary::Transport, Poco::Remoting::JSON::Transport, Poco::Remoting::SoapLite::Transport
Member Functions: connect, connected, disconnect, doExecute, doExecuteOneWay, endExecute, endPoint, getDeserializer, getSerializer, prepareExecute, prepareExecuteOneWay
Transport();
Creates the Transport.
virtual ~Transport();
Destroys the Transport.
virtual void connect(
const std::string & endPoint
) = 0;
Connects the transport to the given endPoint.
virtual bool connected() const = 0;
Returns the conenction status.
virtual void disconnect() = 0;
Disconnects the transport.
virtual void doExecute(
const Identifiable::ObjectId & oid,
const Identifiable::TypeId & tid,
const std::string & methodName
) = 0;
Send the request.
virtual void doExecuteOneWay(
const Identifiable::ObjectId & oid,
const Identifiable::TypeId & tid,
const std::string & methodName
) = 0;
Send the request and forget about it. No response checking.
virtual std::istream & endExecute(
const Identifiable::ObjectId & oid,
const Identifiable::TypeId & tid,
const std::string & methodName
) = 0;
Get the response. Note that even void methods will return at least an empty response except when the method has been flagged as oneway! But in that case the code generator will use doExecuteOneWay instead of doExecute and endExecute.
virtual const std::string & endPoint() const = 0;
Returns the endpoint to which this transport is connected. If not connected, an empty string will be returned.
virtual Deserializer & getDeserializer() = 0;
Get the deserializer bound to that transport.
virtual Serializer & getSerializer() = 0;
Get the serializer bound to that transport.
virtual std::ostream & prepareExecute(
const Identifiable::ObjectId & oid,
const Identifiable::TypeId & tid,
const std::string & methodName
) = 0;
Build a request and return the ouputstream so that the serializer classes can append their information to the request.
virtual std::ostream & prepareExecuteOneWay(
const Identifiable::ObjectId & oid,
const Identifiable::TypeId & tid,
const std::string & methodName
) = 0;
Build a one-way request and return the outputstream so that the serializer classes can append their information to the request.
static const std::string RETURN_PARAM;
The key used to identify a return parameter (the deserializer checks in its deser methods for this key!)