org.apache.geronimo.messaging.io
Interface PopSynchronization

All Known Implementing Classes:
LogicalCompression, PopSynchronizationAdaptor

public interface PopSynchronization

Allows an implementation to be notified when a Msg is about to be popped from an InputStream.

Version:
$Revision: 1.1 $ $Date: 2004/05/11 12:06:41 $

Method Summary
 void afterPop(StreamInputStream anIn, Msg aMsg, Object anOpaque)
          Notifies the implementation that a Msg has been popped.
 Object beforePop(StreamInputStream anIn)
          Notifies the implementation that a Msg is being popped.
 

Method Detail

beforePop

public Object beforePop(StreamInputStream anIn)
                 throws IOException
Notifies the implementation that a Msg is being popped.
This method is called before the actual pop of the Msg.

Parameters:
anIn - Used to read information from the input stream before the Msg itself.
Returns:
Opaque object which is passed back to this instance via afterPop. It can be used to pass information between a beforePop and an afterPop call.
Throws:
IOException - Indicates that an I/O error has occured.

afterPop

public void afterPop(StreamInputStream anIn,
                     Msg aMsg,
                     Object anOpaque)
              throws IOException
Notifies the implementation that a Msg has been popped.

Parameters:
anIn - Used to read information from the input stream after the Msg itself.
aMsg - Msg which has just been popped.
anOpaque - Value returned by beforePop.
Throws:
IOException - Indicates that an I/O error has occured.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.