Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
AgentObject is an extension of Object with agent-specific methods added. More...
#include <qmf/AgentObject.h>
Public Member Functions | |
QMF_EXTERN | AgentObject (const SchemaObjectClass *type) |
Create a new Object of a specific type. | |
QMF_EXTERN void | destroy () |
Schedule this object for deletion. | |
QMF_EXTERN void | setObjectId (ObjectId &oid) |
Set the object ID for this object if it is to be managed by the agent. | |
virtual QMF_EXTERN void | methodInvoked (uint32_t context, const char *name, Value &args, const char *userId) |
Handler for invoked method calls. |
AgentObject is an extension of Object with agent-specific methods added.
Definition at line 38 of file AgentObject.h.
QMF_EXTERN qmf::AgentObject::AgentObject | ( | const SchemaObjectClass * | type | ) |
Create a new Object of a specific type.
type | Pointer to the schema class to use as a type for this object. |
QMF_EXTERN void qmf::AgentObject::destroy | ( | ) |
Schedule this object for deletion.
Agent objects should never be directly destroyed, rather this method should be called and all pointers to this object dropped. The agent will clean up and properly delete the object at the appropraite time.
virtual QMF_EXTERN void qmf::AgentObject::methodInvoked | ( | uint32_t | context, | |
const char * | name, | |||
Value & | args, | |||
const char * | userId | |||
) | [virtual] |
Handler for invoked method calls.
This will only be called for objects that are being managed and stored by an agent (see internalStore argument in Agent::Agent). If this function is not overridden in a child class, the default implementation will cause AgentListener::methodCall to be invoked in the application program.
If this function is overridden in a sub-class, the implementation must perform the actions associated with the method call (i.e. implement the method). Once the method execution is complete, it must call Agent::methodResponse with the result of the method execution. Agent::methodResponse does not need to be called synchronously in the context of this function call. It may be called at a later time from a different thread.
context | Context supplied by the agent and required to be passed in the call to Agent::methodResponse | |
name | The name of the method. | |
args | A Value (of type map) that contains the input and output arguments. | |
userId | The authenticated identity of the user who invoked the method. |
QMF_EXTERN void qmf::AgentObject::setObjectId | ( | ObjectId & | oid | ) |
Set the object ID for this object if it is to be managed by the agent.
oid | The new object ID for the managed object. |