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

#include <qmf/Agent.h>

List of all members.

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.
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.
uint32_t querySchemaAsync ()
uint32_t getPackageCount () const
 Get the list of schema packages exposed by the agent.
const std::string & getPackage (uint32_t) const
uint32_t getSchemaIdCount (const std::string &) const
 Get the list of schema identifiers for a particular package.
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.
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->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< AgentImpl > &h)

Protected Types

typedef AgentImpl Impl

Protected Attributes

Implimpl

Detailed Description

Definition at line 45 of file Agent.h.


Member Typedef Documentation

typedef AgentImpl qmf::Handle< AgentImpl >::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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.

uint32_t qmf::Agent::callMethodAsync ( const std::string &  ,
const qpid::types::Variant::Map ,
const DataAddr  
)
const qpid::types::Variant& qmf::Agent::getAttribute ( const std::string &  ) const
const qpid::types::Variant::Map& qmf::Agent::getAttributes ( ) const
uint32_t qmf::Agent::getEpoch ( ) const
std::string qmf::Agent::getInstance ( ) const
std::string qmf::Agent::getName ( ) const
const std::string& qmf::Agent::getPackage ( uint32_t  ) const
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.

std::string qmf::Agent::getProduct ( ) const
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.

SchemaId qmf::Agent::getSchemaId ( const std::string &  ,
uint32_t   
) const
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.

std::string qmf::Agent::getVendor ( ) const
QMF_INLINE_EXTERN bool qmf::Handle< AgentImpl >::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

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

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle< AgentImpl >::operator bool ( ) const [inline, inherited]

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

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle< AgentImpl >::operator! ( ) const [inline, inherited]

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

Definition at line 51 of file Handle.h.

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

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].

uint32_t qmf::Agent::querySchemaAsync ( )
void qmf::Handle< AgentImpl >::swap ( Handle< AgentImpl > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle< AgentImpl >::impl [protected, inherited]

Definition at line 63 of file Handle.h.


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

Qpid C++ API Reference
Generated on Mon Aug 22 2011 for Qpid C++ Client API by doxygen 1.7.4