Package org.apache.cxf.ws.rm
Class MessageCountingCallback
java.lang.Object
org.apache.cxf.ws.rm.MessageCountingCallback
- All Implemented Interfaces:
MessageCallback
Implementation just counts the number of messages accepted for sending and the number acknowledged, allows checking /
waiting for completion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the number of messages accepted for sending which have not yet been acknowledged.voidmessageAccepted(String seqId, long msgNum) voidmessageAcknowledged(String seqId, long msgNum) booleanwaitComplete(long timeout) Wait for all accepted messages to be acknowledged.
-
Constructor Details
-
MessageCountingCallback
public MessageCountingCallback()
-
-
Method Details
-
messageAccepted
- Specified by:
messageAcceptedin interfaceMessageCallback
-
messageAcknowledged
- Specified by:
messageAcknowledgedin interfaceMessageCallback
-
getCountOutstanding
public int getCountOutstanding()Get the number of messages accepted for sending which have not yet been acknowledged.- Returns:
- count
-
waitComplete
public boolean waitComplete(long timeout) Wait for all accepted messages to be acknowledged.- Parameters:
timeout- maximum time to wait, in milliseconds (no timeout if 0)- Returns:
trueif all accepted messages acknowledged,falseif timed out
-