Package org.apache.cxf.ws.rm.soap
Class RedeliveryQueueImpl
- java.lang.Object
-
- org.apache.cxf.ws.rm.soap.RedeliveryQueueImpl
-
- All Implemented Interfaces:
RedeliveryQueue
public class RedeliveryQueueImpl extends Object implements RedeliveryQueue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
RedeliveryQueueImpl.RedeliverCandidate
-
Field Summary
-
Fields inherited from interface org.apache.cxf.ws.rm.RedeliveryQueue
DEFAULT_BASE_REDELIVERY_INTERVAL, DEFAULT_EXPONENTIAL_BACKOFF
-
-
Constructor Summary
Constructors Constructor Description RedeliveryQueueImpl(RMManager m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUndelivered(org.apache.cxf.message.Message message)
Accepts a failed message for possible future redelivery.protected RedeliveryQueueImpl.RedeliverCandidate
cacheUndelivered(org.apache.cxf.message.Message message)
Accepts a new resend candidate.int
countUndelivered()
int
countUndelivered(DestinationSequence seq)
RMManager
getManager()
RetryStatus
getRedeliveryStatus(DestinationSequence seq, long num)
Returns the retransmission status for the specified message.Map<Long,RetryStatus>
getRedeliveryStatuses(DestinationSequence seq)
Return the retransmission status of all the messages assigned to the sequence.protected List<RedeliveryQueueImpl.RedeliverCandidate>
getSequenceCandidates(String key)
protected List<RedeliveryQueueImpl.RedeliverCandidate>
getSequenceCandidates(DestinationSequence seq)
protected Map<String,List<RedeliveryQueueImpl.RedeliverCandidate>>
getUndelivered()
List<Long>
getUndeliveredMessageNumbers(DestinationSequence seq)
boolean
isEmpty()
protected boolean
isSequenceSuspended(String key)
void
purgeAll(DestinationSequence seq)
Purge all candiates for the given sequence.protected void
purgeDelivered(RedeliveryQueueImpl.RedeliverCandidate candidate)
void
resume(DestinationSequence seq)
Resumes the redelivery attempts for the specified sequencevoid
setManager(RMManager m)
void
start()
Initiate resends.void
stop(DestinationSequence seq)
Stops redelivery queue.void
suspend(DestinationSequence seq)
Suspends the redelivery attempts for the specified sequence
-
-
-
Constructor Detail
-
RedeliveryQueueImpl
public RedeliveryQueueImpl(RMManager m)
-
-
Method Detail
-
getManager
public RMManager getManager()
-
setManager
public void setManager(RMManager m)
-
addUndelivered
public void addUndelivered(org.apache.cxf.message.Message message)
Description copied from interface:RedeliveryQueue
Accepts a failed message for possible future redelivery.- Specified by:
addUndelivered
in interfaceRedeliveryQueue
- Parameters:
message
- the message context.
-
countUndelivered
public int countUndelivered(DestinationSequence seq)
- Specified by:
countUndelivered
in interfaceRedeliveryQueue
- Parameters:
seq
- the sequence under consideration- Returns:
- the number of undelivered messages for that sequence
-
countUndelivered
public int countUndelivered()
- Specified by:
countUndelivered
in interfaceRedeliveryQueue
- Returns:
- the total number of undelivered messages in this queue
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceRedeliveryQueue
- Returns:
- true if there are no unacknowledged messages in the queue
-
purgeAll
public void purgeAll(DestinationSequence seq)
Description copied from interface:RedeliveryQueue
Purge all candiates for the given sequence.- Specified by:
purgeAll
in interfaceRedeliveryQueue
- Parameters:
seq
- the sequence object
-
getUndeliveredMessageNumbers
public List<Long> getUndeliveredMessageNumbers(DestinationSequence seq)
- Specified by:
getUndeliveredMessageNumbers
in interfaceRedeliveryQueue
- Returns:
-
getSequenceCandidates
protected List<RedeliveryQueueImpl.RedeliverCandidate> getSequenceCandidates(DestinationSequence seq)
- Parameters:
seq
- the sequence under consideration- Returns:
- the list of resend candidates for that sequence
-
getSequenceCandidates
protected List<RedeliveryQueueImpl.RedeliverCandidate> getSequenceCandidates(String key)
- Parameters:
key
- the sequence identifier under consideration- Returns:
- the list of resend candidates for that sequence
-
isSequenceSuspended
protected boolean isSequenceSuspended(String key)
- Parameters:
key
- the sequence identifier under consideration- Returns:
- true if the sequence is currently suspended; false otherwise
-
getRedeliveryStatus
public RetryStatus getRedeliveryStatus(DestinationSequence seq, long num)
Description copied from interface:RedeliveryQueue
Returns the retransmission status for the specified message.- Specified by:
getRedeliveryStatus
in interfaceRedeliveryQueue
- Returns:
-
getRedeliveryStatuses
public Map<Long,RetryStatus> getRedeliveryStatuses(DestinationSequence seq)
Description copied from interface:RedeliveryQueue
Return the retransmission status of all the messages assigned to the sequence.- Specified by:
getRedeliveryStatuses
in interfaceRedeliveryQueue
- Returns:
-
start
public void start()
Description copied from interface:RedeliveryQueue
Initiate resends.- Specified by:
start
in interfaceRedeliveryQueue
-
stop
public void stop(DestinationSequence seq)
Description copied from interface:RedeliveryQueue
Stops redelivery queue.- Specified by:
stop
in interfaceRedeliveryQueue
-
suspend
public void suspend(DestinationSequence seq)
Description copied from interface:RedeliveryQueue
Suspends the redelivery attempts for the specified sequence- Specified by:
suspend
in interfaceRedeliveryQueue
-
resume
public void resume(DestinationSequence seq)
Description copied from interface:RedeliveryQueue
Resumes the redelivery attempts for the specified sequence- Specified by:
resume
in interfaceRedeliveryQueue
-
cacheUndelivered
protected RedeliveryQueueImpl.RedeliverCandidate cacheUndelivered(org.apache.cxf.message.Message message)
Accepts a new resend candidate.- Parameters:
message
- the message.- Returns:
- ResendCandidate
-
purgeDelivered
protected void purgeDelivered(RedeliveryQueueImpl.RedeliverCandidate candidate)
-
getUndelivered
protected Map<String,List<RedeliveryQueueImpl.RedeliverCandidate>> getUndelivered()
- Returns:
- a map relating sequence ID to a lists of un-acknowledged messages for that sequence
-
-