qpid::framing::MethodContext Struct Reference

Invocation context for an AMQP method. More...

#include <MethodContext.h>

Collaboration diagram for qpid::framing::MethodContext:

Collaboration graph
[legend]
List of all members.

Public Types

typedef boost::shared_ptr<
AMQMethodBody > 
BodyPtr

Public Member Functions

 MethodContext (ChannelAdapter *ch=0, BodyPtr method=BodyPtr())
RequestId getRequestId () const
 Return methodBody's request ID.

Public Attributes

ChannelAdapterchannel
 Channel on which the method being processed arrived.
BodyPtr methodBody
 Body of the method being processed.

Detailed Description

Invocation context for an AMQP method.

It provides the method being processed and the channel on which it arrived.

All Handler functions take a MethodContext as the last parameter.


Member Function Documentation

RequestId qpid::framing::MethodContext::getRequestId (  )  const

Return methodBody's request ID.

It is an error to call this if methodBody is not a request.


Member Data Documentation

ChannelAdapter* qpid::framing::MethodContext::channel

Channel on which the method being processed arrived.

0 if the method was constructed by the caller rather than received from a channel.

BodyPtr qpid::framing::MethodContext::methodBody

Body of the method being processed.

It's useful for passing around instead of unpacking all its parameters. It's also provides the request ID when constructing a response.


The documentation for this struct was generated from the following file:
Generated on Tue Apr 17 14:22:19 2007 for Qpid by  doxygen 1.4.7