Poco::Remoting

class Listener

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

Description

Listener interface. A listener should wait for incoming requests and handle them

Inheritance

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

Member Summary

Member Functions: getLocalEndPoint, getTransportId, registerObject, start, stop, unregisterObject

Constructors

Listener

Listener(
    const std::string & localEndPoint
);

Creates the Listener. Takes a local endpoint as input. For network based listener, this will be the port as string.

Destructor

~Listener virtual

virtual ~Listener();

Destroys the Listener.

Member Functions

getLocalEndPoint inline

const std::string & getLocalEndPoint() const;

Returns the local endpoint of the listener. For network based listener, this will be the port as string.

getTransportId virtual

virtual const std::string & getTransportId() const = 0;

Returns the ID of the transport for which this listener handles requests

registerObject virtual

virtual void registerObject(
    Poco::AutoPtr < RemoteObject > ptrObj,
    Poco::AutoPtr < Skeleton > ptrSkel,
    const Identifiable::ObjectId & oid,
    const Identifiable::TypeId & tid,
    bool secure
) = 0;

Adds an object to the listener. Depending on the protocol, the Listener can opt to let the ORB handle all invocations (i.e we have a protocol where we can send the fullURI with the request, which allows to implement a requesthandler that simply calls ORB::invoke. In this case, registerObject and unregisterObject can have an empty implementation. Note that registerObject is called from inside the ORB, and thus is not allowed to call the ORB (dead-lock).

start virtual

virtual void start() = 0;

Starts a listener.

stop virtual

virtual void stop() = 0;

Stops a listener.

unregisterObject virtual

virtual void unregisterObject(
    Poco::AutoPtr < RemoteObject > ptrObj
) = 0;

Unregisters an object from the Listener.