org.apache.geronimo.messaging.io
Interface PushSynchronization

All Known Implementing Classes:
LogicalCompression, PushSynchronizationAdaptor

public interface PushSynchronization

Allows an implementation to be notified when a Msg is about to be pushed.

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

Method Summary
 void afterPush(StreamOutputStream anOut, Msg aMsg, Object anOpaque)
          Notifies the implementation that a Msg has been pushed.
 Object beforePush(StreamOutputStream anOut, Msg aMsg)
          Notifies the implementation that a Msg is being pushed.
 

Method Detail

beforePush

public Object beforePush(StreamOutputStream anOut,
                         Msg aMsg)
                  throws IOException
Notifies the implementation that a Msg is being pushed.
This method is called before the actual push of the Msg.

Parameters:
anOut - Used to write information before the Msg itself.
aMsg - Msg being pushed.
Returns:
Opaque object which is passed by to this instance via afterPush. It can be used to pass information between a beforePush and a afterPush call.
Throws:
IOException - Indicates that an I/O error has occured.

afterPush

public void afterPush(StreamOutputStream anOut,
                      Msg aMsg,
                      Object anOpaque)
               throws IOException
Notifies the implementation that a Msg has been pushed.

Parameters:
anOut - Used to write information after the Msg itself.
aMsg - Msg which has just been pushed.
anOpaque - Value returned by beforePush.
Throws:
IOException - Indicates that an I/O error has occured.


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