org.apache.qpid.protocol
Class AMQMethodEvent<M extends AMQMethodBody>

java.lang.Object
  extended by org.apache.qpid.protocol.AMQMethodEvent<M>

public class AMQMethodEvent<M extends AMQMethodBody>
extends Object

AMQMethodEvent encapsulates an AMQP method call, and the channel on which that method call occurred.

Supplies the:

As the event contains the context in which it occurred, event listeners do not need to be statefull. to listeners. Events are often handled by AMQMethodListeners.

CRC Card
Responsibilities Collaborations
Encapsulate an AMQP method call and the channel as the context for the method call.


Constructor Summary
AMQMethodEvent(int channelId, M method)
          Creates a method event to encasulate a method call and channel.
 
Method Summary
 int getChannelId()
          Gets the channel handle for the method call.
 M getMethod()
          Gets the method call.
 String toString()
          Prints the method call as a string, mainly for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AMQMethodEvent

public AMQMethodEvent(int channelId,
                      M method)
Creates a method event to encasulate a method call and channel.

Parameters:
channelId - The channel on which the method call occurred.
method - The method call.
Method Detail

getMethod

public M getMethod()
Gets the method call.

Returns:
The method call.

getChannelId

public int getChannelId()
Gets the channel handle for the method call.

Returns:
The channel handle for the method call.

toString

public String toString()
Prints the method call as a string, mainly for debugging purposes.

Overrides:
toString in class Object
Returns:
The method call as a string, mainly for debugging purposes.


Licensed to the Apache Software Foundation