Class AMQMethodEvent<M extends AMQMethodBody>


  • 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:

    • 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 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.