Poco::Remoting

class Transport

Library: Remoting
Package: Transport
Header: Poco/Remoting/Transport.h

Description

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.

Inheritance

Known Derived Classes: Poco::Netconf::Transport, Poco::Remoting::Binary::Transport, Poco::Remoting::SoapLite::Transport

Member Summary

Member Functions: connect, connected, disconnect, doExecute, doExecuteOneWay, endExecute, endPoint, getDeserializer, getSerializer, prepareExecute, prepareExecuteOneWay

Constructors

Transport

Transport();

Creates the Transport.

Destructor

~Transport virtual

virtual ~Transport();

Destroys the Transport.

Member Functions

connect virtual

virtual void connect(
    const std::string & endPoint
) = 0;

Connects the transport to the given endPoint.

connected virtual

virtual bool connected() const = 0;

Returns the conenction status.

disconnect virtual

virtual void disconnect() = 0;

Disconnects the transport.

doExecute virtual

virtual void doExecute(
    const Identifiable::ObjectId & oid,
    const Identifiable::TypeId & tid,
    const std::string & methodName
) = 0;

Send the request.

doExecuteOneWay virtual

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.

endExecute virtual

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.

endPoint virtual

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.

getDeserializer virtual

virtual Deserializer & getDeserializer() = 0;

Get the deserializer bound to that transport.

getSerializer virtual

virtual Serializer & getSerializer() = 0;

Get the serializer bound to that transport.

prepareExecute virtual

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.

prepareExecuteOneWay virtual

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.

Variables

RETURN_PARAM static

static const std::string RETURN_PARAM;

The key used to identify a return parameter (the deserializer checks in its deser methods for this key!)