CppWAMP
C++11 client library for the WAMP protocol
wamp::Event Class Reference

Provides the subscription/publication ids, options, and payload contained within WAMP EVENT messages. More...

#include <cppwamp/peerdata.hpp>

Inheritance diagram for wamp::Event:

Public Member Functions

 Event ()
 Default constructor. More...
 
bool empty () const
 Returns false if the Event has been initialized and is ready for use.
 
SubscriptionId subId () const
 Obtains the subscription ID associated with this event.
 
PublicationId pubId () const
 Obtains the publication ID associated with this event.
 
AnyIoExecutor executor () const
 Obtains the executor used to execute user-provided handlers. More...
 
Publisher Identification
Variant publisher () const
 Obtains an optional publisher ID integer. More...
 
Publication Trust Levels
Variant trustLevel () const
 Obtains an optional trust level integer. More...
 
Pattern-based Subscriptions
Variant topic () const
 Obtains an optional string of the original topic URI used to make the publication. More...
 

Detailed Description

Provides the subscription/publication ids, options, and payload contained within WAMP EVENT messages.

Constructor & Destructor Documentation

◆ Event()

wamp::Event::Event ( )

Default constructor.

Postcondition
this->empty() == true

Member Function Documentation

◆ executor()

AnyIoExecutor wamp::Event::executor ( ) const

Obtains the executor used to execute user-provided handlers.

Returns
the same object as Session::userExecutor().
Precondition
this->empty() == false

◆ publisher()

Variant wamp::Event::publisher ( ) const

Obtains an optional publisher ID integer.

This function returns the value of the EVENT.Details.publisher|integer detail.

Returns
An integer variant if the publisher ID is available. Otherwise, a null variant is returned.

◆ trustLevel()

Variant wamp::Event::trustLevel ( ) const

Obtains an optional trust level integer.

This function returns the value of the EVENT.Details.trustlevel|integer detail.

Returns
An integer variant if the trust level is available. Otherwise, a null variant is returned.

◆ topic()

Variant wamp::Event::topic ( ) const

Obtains an optional string of the original topic URI used to make the publication.

This function checks the value of the EVENT.Details.topic|uri detail.

Returns
A string variant if the topic URI is available. Otherwise, a null variant is returned.

The documentation for this class was generated from the following files: