com.groiss.wfxml
Interface BufferListener
public interface BufferListener
You can use a buffer listener in order to have control of messages that can
not be sent immediately. If a message cannot be sent immediately (or the server
is passive), the message will be stored in the buffer. Later, the message will
be sent, but maybe you don't want the message to be sent any more then. In such
a case it is a good idea to use a buffer listener, because with it you can place
a veto before the message will be actually sent from the buffer.
You can define a buffer listener for a message at the moment when you send it.
To do it, you must use the Sender.send(WfXMLMessage,Partner,Class,Class)
method. The last parameter is the buffer listener that you want to use.
|
Method Summary |
boolean |
doSendFromBuffer(WfXMLMessage message)
This method will be called by the WfXML Timer Task before it sends a message
from the local outgoing buffer. |
doSendFromBuffer
boolean doSendFromBuffer(WfXMLMessage message)
- This method will be called by the WfXML Timer Task before it sends a message
from the local outgoing buffer. If you want, you can modify the message in this
method. You must decide whether the message has to be sent or not by returning
an appropriate boolean value.
- Parameters:
message - The message that will be sent from the buffer. You can still
modify it, if necessary.
- Returns:
true if you want that the message is sent now. Mind that
this doesn't actually mean that the message really will be sent. If communication
with the partner server fails, the message can still be kept in the buffer. So,
before the next attempt of sending will be done, this method will be called again.
The other option is to return false. In that case the message will
not be sent and it will be deleted from the buffer! So, if you return false
it means that the message will be thrown away and that it will never be sent.
Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.