Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Public Member Functions | Protected Types | Protected Attributes | List of all members
qmf::Agent Class Reference

#include <qmf/Agent.h>

Public Member Functions

 Agent (AgentImpl *impl=0)
 
 Agent (const Agent &)
 
Agentoperator= (const Agent &)
 
 ~Agent ()
 
std::string getName () const
 
uint32_t getEpoch () const
 
std::string getVendor () const
 
std::string getProduct () const
 
std::string getInstance () const
 
const qpid::types::VariantgetAttribute (const std::string &) const
 
const qpid::types::Variant::MapgetAttributes () const
 
ConsoleEvent query (const Query &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 
ConsoleEvent query (const std::string &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 
uint32_t queryAsync (const Query &)
 
uint32_t queryAsync (const std::string &)
 
ConsoleEvent callMethod (const std::string &, const qpid::types::Variant::Map &, const DataAddr &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 Create a subscription to this agent. More...
 
uint32_t callMethodAsync (const std::string &, const qpid::types::Variant::Map &, const DataAddr &)
 
ConsoleEvent querySchema (qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 Query the agent for a list of schema classes that it exposes. More...
 
uint32_t querySchemaAsync ()
 
uint32_t getPackageCount () const
 Get the list of schema packages exposed by the agent. More...
 
const std::string & getPackage (uint32_t) const
 
uint32_t getSchemaIdCount (const std::string &) const
 Get the list of schema identifiers for a particular package. More...
 
SchemaId getSchemaId (const std::string &, uint32_t) const
 
Schema getSchema (const SchemaId &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 Get detailed schema information for a specified schema ID. More...
 
QMF_INLINE_EXTERN bool isValid () const
 
QMF_INLINE_EXTERN bool isNull () const
 
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->... More...
 
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }. More...
 
void swap (Handle< AgentImpl > &h)
 

Protected Types

typedef AgentImpl Impl
 

Protected Attributes

Implimpl
 

Detailed Description

Definition at line 50 of file Agent.h.

Member Typedef Documentation

◆ Impl

typedef AgentImpl qmf::Handle< AgentImpl >::Impl
protectedinherited

Definition at line 61 of file Handle.h.

Constructor & Destructor Documentation

◆ Agent() [1/2]

qmf::Agent::Agent ( AgentImpl *  impl = 0)

◆ Agent() [2/2]

qmf::Agent::Agent ( const Agent )

◆ ~Agent()

qmf::Agent::~Agent ( )

Member Function Documentation

◆ callMethod()

ConsoleEvent qmf::Agent::callMethod ( const std::string &  ,
const qpid::types::Variant::Map ,
const DataAddr ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)

Create a subscription to this agent.

◆ callMethodAsync()

uint32_t qmf::Agent::callMethodAsync ( const std::string &  ,
const qpid::types::Variant::Map ,
const DataAddr  
)

◆ getAttribute()

const qpid::types::Variant& qmf::Agent::getAttribute ( const std::string &  ) const

◆ getAttributes()

const qpid::types::Variant::Map& qmf::Agent::getAttributes ( ) const

◆ getEpoch()

uint32_t qmf::Agent::getEpoch ( ) const

◆ getInstance()

std::string qmf::Agent::getInstance ( ) const

◆ getName()

std::string qmf::Agent::getName ( ) const

◆ getPackage()

const std::string& qmf::Agent::getPackage ( uint32_t  ) const

◆ getPackageCount()

uint32_t qmf::Agent::getPackageCount ( ) const

Get the list of schema packages exposed by the agent.

getPackageCount returns the number of packages exposed. getPackage returns the name of the package by index (0..package-count)

Note that both of these calls are synchronous and non-blocking. They only return locally cached data and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema information from the remote agent.

◆ getProduct()

std::string qmf::Agent::getProduct ( ) const

◆ getSchema()

Schema qmf::Agent::getSchema ( const SchemaId ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)

Get detailed schema information for a specified schema ID.

This call will return cached information if it is available. If not, it will send a query message to the remote agent and block waiting for a response. The timeout argument specifies the maximum time to wait for a response from the agent.

◆ getSchemaId()

SchemaId qmf::Agent::getSchemaId ( const std::string &  ,
uint32_t   
) const

◆ getSchemaIdCount()

uint32_t qmf::Agent::getSchemaIdCount ( const std::string &  ) const

Get the list of schema identifiers for a particular package.

getSchemaIdCount returns the number of IDs in the indicates package. getSchemaId returns the SchemaId by index (0..schema-id-count)

Note that both of these calls are synchronous and non-blocking. They only return locally cached data and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema information from the remote agent.

◆ getVendor()

std::string qmf::Agent::getVendor ( ) const

◆ isNull()

QMF_INLINE_EXTERN bool qmf::Handle< AgentImpl >::isNull ( ) const
inlineinherited
Returns
true if handle is null. It is an error to call any function on a null handle.

Definition at line 50 of file Handle.h.

◆ isValid()

QMF_INLINE_EXTERN bool qmf::Handle< AgentImpl >::isValid ( ) const
inlineinherited
Returns
true if handle is valid, i.e. not null.

Definition at line 47 of file Handle.h.

◆ operator bool()

QMF_INLINE_EXTERN qmf::Handle< AgentImpl >::operator bool ( ) const
inlineinherited

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 53 of file Handle.h.

◆ operator!()

QMF_INLINE_EXTERN bool qmf::Handle< AgentImpl >::operator! ( ) const
inlineinherited

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 56 of file Handle.h.

◆ operator=()

Agent& qmf::Agent::operator= ( const Agent )

◆ query() [1/2]

ConsoleEvent qmf::Agent::query ( const Query ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)

◆ query() [2/2]

ConsoleEvent qmf::Agent::query ( const std::string &  ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)

◆ queryAsync() [1/2]

uint32_t qmf::Agent::queryAsync ( const Query )

◆ queryAsync() [2/2]

uint32_t qmf::Agent::queryAsync ( const std::string &  )

◆ querySchema()

Query the agent for a list of schema classes that it exposes.

This operation comes in both synchronous (blocking) and asynchronous flavors.

This method will typically be used after receiving an AGENT_SCHEMA_UPDATE event from the console session. It may also be used on a newly discovered agent to learn what schemata are exposed.

querySchema returns a ConsoleEvent that contains a list of SchemaId objects exposed by the agent. This list is cached locally and can be locally queried using getPackage[Count] and getSchemaId[Count].

◆ querySchemaAsync()

uint32_t qmf::Agent::querySchemaAsync ( )

◆ swap()

void qmf::Handle< AgentImpl >::swap ( Handle< AgentImpl > &  h)
inlineinherited

Definition at line 58 of file Handle.h.

Member Data Documentation

◆ impl

Impl* qmf::Handle< AgentImpl >::impl
protectedinherited

Definition at line 68 of file Handle.h.


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

Qpid C++ API Reference
Generated on Fri Dec 1 2017 for Qpid C++ Client API by doxygen 1.8.13