File Information
Library: IoT/WebEvent
Package: Generated
Header: IoT/WebEvent/IWebEventNotifier.h
Description
A simplified Remoting-capable interface to the Poco::OSP::WebEvent::WebEventService, usable from both C++ and JavaScript.
Inheritance
Direct Base Classes: Poco::OSP::Service
All Base Classes: Poco::OSP::Service, Poco::RefCountedObject
Known Derived Classes: WebEventNotifierRemoteObject
Member Summary
Member Functions: clearEventFilter, isA, notify, remoting__enableEvents, remoting__typeId, setEventSubjectNameFilter, setEventSubjectRegexFilter, type
Inherited Functions: duplicate, isA, referenceCount, release, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < IWebEventNotifier >;
Constructors
IWebEventNotifier
Creates a IWebEventNotifier.
Destructor
~IWebEventNotifier
virtual ~IWebEventNotifier();
Destroys the IWebEventNotifier.
Member Functions
clearEventFilter
virtual void clearEventFilter(
const std::string & subscriberURI
) = 0;
Clears any event filter that has been set with setEventSubjectFilter().
isA
bool isA(
const std::type_info & otherType
) const;
Returns true if the class is a subclass of the class given by otherType.
See also: Poco::OSP::Service::isA()
notify
virtual void notify(
const std::string & subjectName,
const std::string & data
) = 0;
Notify all registered subscribers to the given subject, using the given data, which is typically a serialized JSON or XML document in UTF-8 encoding.
Sending the notification is done asynchronously. If a notification cannot be delivered to a subscriber due to a network issue, the subscriber will be removed and its WebSocket closed.
remoting__enableEvents
virtual std::string remoting__enableEvents(
Poco::RemotingNG::Listener::Ptr pListener,
bool enable = bool (true)
) = 0;
Enable or disable delivery of remote events.
The given Listener instance must implement the Poco::RemotingNG::EventListener interface, otherwise this method will fail with a RemotingException.
This method is only used with Proxy objects; calling this method on a RemoteObject will do nothing.
remoting__typeId
static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();
Returns the TypeId of the class.
setEventSubjectNameFilter
virtual void setEventSubjectNameFilter(
const std::string & subscriberURI,
const std::string & subjectName
) = 0;
Sets a filter on the event to only report events with the given subjectName.
setEventSubjectRegexFilter
virtual void setEventSubjectRegexFilter(
const std::string & subscriberURI,
const std::string & regex
) = 0;
Sets a filter on the event to only report events with the subjectName matching the specified regex.
type
const std::type_info & type() const;
Returns the type information for the object's class.
See also: Poco::OSP::Service::type()
Variables
event
Poco::BasicEvent < const IoT::WebEvent::EventNotification > event;