Poco::Netconf

class Transport

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

Description

Netconf Transport implementation. The following requirements must be met, so that one can use Netconf as transport: On the server side one must (1) register the TransportFactory, (2) each class must have a namespace property assigned, (3) register a Listener and finally, (4) register the individual objects.

Example:

Netconf::TransportFactory::registerFactory();
Poco::Remoting::ORB::instance().registerListener(new Netconf::Listener(10001));
TestProject::MySubClassHelper::registerObject(new TestProject::MySubClass(), "subclass1", 10001, Netconf::Transport::ID, false);

On the client side, requirements are similar: (1) TransportFactory and (2) retrieve the object via the helper class.

Example:

Netconf::TransportFactory::registerFactory();
Poco::AutoPtr<TestProject::IMySubClass> ptrObj = TestProject::MySubClassHelper::findObject(hostName, "subclass1", 10001, Netconf::Transport::ID, false);

Inheritance

Direct Base Classes: Poco::Remoting::Transport

All Base Classes: Poco::Remoting::Transport

Member Summary

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

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

Constructors

Transport

Transport();

Creates the Transport with an uninitialized session

Destructor

~Transport virtual

~Transport();

Destroys the Transport.

Member Functions

connect virtual

void connect(
    const std::string & endPoint
);

The endpoint must be in http format, e.g.: http://www.xyz.org:666/path, or https://...

See also: Poco::Remoting::Transport::connect()

connected virtual inline

bool connected() const;

Returns the connection status.

See also: Poco::Remoting::Transport::connected()

disconnect virtual

void disconnect();

Disconnects the transport.

See also: Poco::Remoting::Transport::disconnect()

doExecute

void doExecute(
    const Poco::Remoting::Identifiable::ObjectId & oId,
    const Poco::Remoting::Identifiable::TypeId & tid,
    const std::string & methodName
);

Send the request.

doExecuteOneWay

void doExecuteOneWay(
    const Poco::Remoting::Identifiable::ObjectId & oId,
    const Poco::Remoting::Identifiable::TypeId & tid,
    const std::string & methodName
);

Send the request and forget about it. No response checking.

endExecute

std::istream & endExecute(
    const Poco::Remoting::Identifiable::ObjectId & oId,
    const Poco::Remoting::Identifiable::TypeId & tid,
    const std::string & methodName
);

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 inline

const std::string & endPoint() const;

Returns the endpoint this transport is connected to or an empty string if it is not connected.

See also: Poco::Remoting::Transport::endPoint()

getDeserializer inline

Poco::Remoting::Deserializer & getDeserializer();

Returns a Netconf deserializer.

getNetconfDeserializer inline

Deserializer & getNetconfDeserializer();

Helper function to avoid dynamic casting

getNetconfSerializer inline

Serializer & getNetconfSerializer();

Helper function to avoid dynamic casting

getSerializer inline

Poco::Remoting::Serializer & getSerializer();

Returns a Netconf serializer.

prepareExecute inline

std::ostream & prepareExecute(
    const Poco::Remoting::Identifiable::ObjectId & oId,
    const Poco::Remoting::Identifiable::TypeId & tid,
    const std::string & methodName
);

Build a request and return the ouputstream so that the serializer classes can append their information to the request.

prepareExecuteOneWay

std::ostream & prepareExecuteOneWay(
    const Poco::Remoting::Identifiable::ObjectId & oId,
    const Poco::Remoting::Identifiable::TypeId & tid,
    const std::string & methodName
);

Build a one-way request and return the outputstream so that the serializer classes can append their information to the request.

Variables

ATTR_POSTFIX static

static const std::string ATTR_POSTFIX;

DEFAULT_CAPABILITIES static

static const Capabilities DEFAULT_CAPABILITIES;

END_OF_MESSAGE static

static const std::string END_OF_MESSAGE;

ID static

static const std::string ID;

SESSION_ID static

static const std::string SESSION_ID;

SessionId static

static Poco::ThreadLocal < Poco::UInt32 > SessionId;