Library: Remoting
Package: Remoting
Header: Poco/Remoting/Listener.h
Listener interface. A listener should wait for incoming requests and handle them
Known Derived Classes: Poco::Remoting::Binary::Listener, Poco::Remoting::JSON::Listener, Poco::Remoting::SoapLite::Listener
Member Functions: getLocalEndPoint, getTransportId, registerObject, start, stop, unregisterObject
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.
virtual ~Listener();
Destroys the Listener.
const std::string & getLocalEndPoint() const;
Returns the local endpoint of the listener. For network based listener, this will be the port as string.
virtual const std::string & getTransportId() const = 0;
Returns the ID of the transport for which this listener handles requests
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).
virtual void start() = 0;
Starts a listener.
virtual void stop() = 0;
Stops a listener.
virtual void unregisterObject(
Poco::AutoPtr < RemoteObject > ptrObj
) = 0;
Unregisters an object from the Listener.