File Information
Library: IoT/WebEvent
Package: Generated
Header: IoT/WebEvent/WebEventNotifierRemoteObject.h
Description
A simplified Remoting-capable interface to the Poco::OSP::WebEvent::WebEventService, usable from both C++ and JavaScript.
Inheritance
Direct Base Classes: IWebEventNotifier, Poco::RemotingNG::RemoteObject
All Base Classes: IWebEventNotifier, Poco::OSP::Service, Poco::RefCountedObject, Poco::RemotingNG::Identifiable, Poco::RemotingNG::RemoteObject
Member Summary
Member Functions: clearEventFilter, event__event, notify, remoting__enableEvents, remoting__enableRemoteEvents, remoting__hasEvents, remoting__typeId, setEventSubjectNameFilter, setEventSubjectRegexFilter
Inherited Functions: clearEventFilter, duplicate, isA, mutex, notify, referenceCount, release, remoting__enableEvents, remoting__enableRemoteEvents, remoting__getURI, remoting__hasEvents, remoting__objectId, remoting__setURI, remoting__typeId, setEventSubjectNameFilter, setEventSubjectRegexFilter, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < WebEventNotifierRemoteObject >;
Constructors
WebEventNotifierRemoteObject
WebEventNotifierRemoteObject(
const Poco::RemotingNG::Identifiable::ObjectId & oid,
Poco::SharedPtr < IoT::WebEvent::WebEventNotifier > pServiceObject
);
Creates a WebEventNotifierRemoteObject.
Destructor
~WebEventNotifierRemoteObject
virtual ~WebEventNotifierRemoteObject();
Destroys the WebEventNotifierRemoteObject.
Member Functions
clearEventFilter
virtual void clearEventFilter(
const std::string & subscriberURI
);
Clears any event filter that has been set with setEventSubjectFilter().
notify
virtual void notify(
const std::string & subjectName,
const std::string & data
);
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)
);
remoting__enableRemoteEvents
virtual void remoting__enableRemoteEvents(
const std::string & protocol
);
remoting__hasEvents
virtual bool remoting__hasEvents() const;
remoting__typeId
virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;
setEventSubjectNameFilter
virtual void setEventSubjectNameFilter(
const std::string & subscriberURI,
const std::string & subjectName
);
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
);
Sets a filter on the event to only report events with the subjectName matching the specified regex.
event__event
void event__event(
const IoT::WebEvent::EventNotification & data
);