Class AMQMethodEvent<M extends AMQMethodBody>
- java.lang.Object
-
- org.apache.qpid.server.protocol.v0_8.transport.AMQMethodEvent<M>
-
public class AMQMethodEvent<M extends AMQMethodBody> extends java.lang.ObjectAMQMethodEvent encapsulates an AMQP method call, and the channel on which that method call occurred.Supplies the:
- channel id
- protocol method
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.
-
-
Constructor Summary
Constructors Constructor Description AMQMethodEvent(int channelId, M method)Creates a method event to encasulate a method call and channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetChannelId()Gets the channel handle for the method call.MgetMethod()Gets the method call.java.lang.StringtoString()Prints the method call as a string, mainly for debugging purposes.
-
-
-
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 java.lang.String toString()
Prints the method call as a string, mainly for debugging purposes.- Overrides:
toStringin classjava.lang.Object- Returns:
- The method call as a string, mainly for debugging purposes.
-
-