Class AMQMethodEvent<M extends AMQMethodBody>


  • public class AMQMethodEvent<M extends AMQMethodBody>
    extends java.lang.Object
    AMQMethodEvent 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
      int getChannelId()
      Gets the channel handle for the method call.
      M getMethod()
      Gets the method call.
      java.lang.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 java.lang.String toString()
        Prints the method call as a string, mainly for debugging purposes.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The method call as a string, mainly for debugging purposes.