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

Contains payload arguments and other options within WAMP INVOCATION messages. More...

#include <cppwamp/peerdata.hpp>

Inheritance diagram for wamp::Invocation:

Public Member Functions

 Invocation ()
 Default constructor. More...
 
bool empty () const
 Returns false if the Invocation has been initialized and is ready for use.
 
bool calleeHasExpired () const
 Determines if the Session object that dispatched this invocation still exists or has expired.
 
RequestId requestId () const
 Returns the request ID associated with this RPC invocation.
 
AnyIoExecutor executor () const
 Obtains the executor used to execute user-provided handlers. More...
 
void yield (Result result=Result()) const
 Manually sends a YIELD result back to the callee. More...
 
void yield (Error error) const
 Manually sends an ERROR result back to the callee. More...
 
Progressive Call Results
bool isProgressive () const
 Checks if the caller requested progressive results. More...
 
Caller Identification
Variant caller () const
 Returns an optional session ID integer of the caller. More...
 
Call Trust Levels
Variant trustLevel () const
 Returns an optional trust level integer. More...
 
Pattern-based Registrations
Variant procedure () const
 Returns an optional string of the original procedure URI used to make this call. More...
 

Detailed Description

Contains payload arguments and other options within WAMP INVOCATION messages.

This class also provides the means for manually sending a YIELD or ERROR result back to the RPC caller.

Constructor & Destructor Documentation

◆ Invocation()

wamp::Invocation::Invocation ( )

Default constructor.

Postcondition
this->empty() == true

Member Function Documentation

◆ executor()

AnyIoExecutor wamp::Invocation::executor ( ) const

Obtains the executor used to execute user-provided handlers.

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

◆ yield() [1/2]

void wamp::Invocation::yield ( Result  result = Result()) const

Manually sends a YIELD result back to the callee.

Precondition
this->calleeHasExpired == false

◆ yield() [2/2]

void wamp::Invocation::yield ( Error  error) const

Manually sends an ERROR result back to the callee.

Precondition
this->calleeHasExpired == false

◆ isProgressive()

bool wamp::Invocation::isProgressive ( ) const

Checks if the caller requested progressive results.

This function checks if the INVOCATION.Details.receive_progress|bool detail is true.

◆ caller()

Variant wamp::Invocation::caller ( ) const

Returns an optional session ID integer of the caller.

This function returns the value of the INVOCATION.Details.caller|integer detail.

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

◆ trustLevel()

Variant wamp::Invocation::trustLevel ( ) const

Returns an optional trust level integer.

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

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

◆ procedure()

Variant wamp::Invocation::procedure ( ) const

Returns an optional string of the original procedure URI used to make this call.

This function returns the value of the INVOCATION.Details.procedure|uri detail.

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

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