org.apache.qpid.client.protocol
Class BlockingMethodFrameListener

java.lang.Object
  extended by org.apache.qpid.client.protocol.BlockingMethodFrameListener
All Implemented Interfaces:
AMQMethodListener
Direct Known Subclasses:
SpecificMethodFrameListener

public abstract class BlockingMethodFrameListener
extends java.lang.Object
implements AMQMethodListener


Field Summary
protected  int _channelId
           
protected  AMQMethodEvent _doneEvt
           
 
Constructor Summary
BlockingMethodFrameListener(int channelId)
           
 
Method Summary
 AMQMethodEvent blockForFrame()
          This method is called by the thread that wants to wait for a frame.
 void error(java.lang.Exception e)
          This is a callback, called by the MINA dispatcher thread only.
 boolean methodReceived(AMQMethodEvent evt)
          This method is called by the MINA dispatching thread.
abstract  boolean processMethod(int channelId, org.apache.qpid.framing.AMQMethodBody frame)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_channelId

protected int _channelId

_doneEvt

protected AMQMethodEvent _doneEvt
Constructor Detail

BlockingMethodFrameListener

public BlockingMethodFrameListener(int channelId)
Method Detail

processMethod

public abstract boolean processMethod(int channelId,
                                      org.apache.qpid.framing.AMQMethodBody frame)
                               throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

methodReceived

public boolean methodReceived(AMQMethodEvent evt)
                       throws org.apache.qpid.AMQException
This method is called by the MINA dispatching thread. Note that it could be called before blockForFrame() has been called.

Specified by:
methodReceived in interface AMQMethodListener
Parameters:
evt - the frame event
Returns:
true if the listener has dealt with this frame
Throws:
org.apache.qpid.AMQException

blockForFrame

public AMQMethodEvent blockForFrame()
                             throws org.apache.qpid.AMQException
This method is called by the thread that wants to wait for a frame.

Throws:
org.apache.qpid.AMQException

error

public void error(java.lang.Exception e)
This is a callback, called by the MINA dispatcher thread only. It is also called from within this class to avoid code repetition but again is only called by the MINA dispatcher thread.

Specified by:
error in interface AMQMethodListener
Parameters:
e -