org.apache.qpid.server.protocol
Interface AMQMethodListener

All Known Implementing Classes:
AMQStateManager

public interface AMQMethodListener

Interface that allows classes to register for interest in protocol method frames.


Method Summary
 void error(org.apache.qpid.AMQException e)
          Callback when an error has occurred.
<B extends org.apache.qpid.framing.AMQMethodBody>
boolean
methodReceived(AMQMethodEvent<B> evt, AMQProtocolSession protocolSession, QueueRegistry queueRegistry, ExchangeRegistry exchangeRegistry)
          Invoked when a method frame has been received
 

Method Detail

methodReceived

<B extends org.apache.qpid.framing.AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt,
                                                                         AMQProtocolSession protocolSession,
                                                                         QueueRegistry queueRegistry,
                                                                         ExchangeRegistry exchangeRegistry)
                       throws org.apache.qpid.AMQException
Invoked when a method frame has been received

Parameters:
evt - the event that contains the method and channel
protocolSession - the protocol session associated with the event
Returns:
true if the handler has processed the method frame, false otherwise. Note that this does not prohibit the method event being delivered to subsequent listeners but can be used to determine if nobody has dealt with an incoming method frame.
Throws:
org.apache.qpid.AMQException - if an error has occurred. This exception will be delivered to all registered listeners using the error() method (see below) allowing them to perform cleanup if necessary.

error

void error(org.apache.qpid.AMQException e)
Callback when an error has occurred. Allows listeners to clean up.

Parameters:
e -