public class RetransmissionQueueImpl extends Object implements RetransmissionQueue
| Modifier and Type | Class and Description |
|---|---|
static class |
RetransmissionQueueImpl.CopyOutInterceptor |
protected class |
RetransmissionQueueImpl.ResendCandidate
Represents a candidate for resend, i.e.
|
static interface |
RetransmissionQueueImpl.Resender
Encapsulates actual resend logic (pluggable to facilitate unit testing)
|
DEFAULT_BASE_RETRANSMISSION_INTERVAL, DEFAULT_EXPONENTIAL_BACKOFF| Constructor and Description |
|---|
RetransmissionQueueImpl(RMManager m) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUnacknowledged(Message message)
Accepts a new message for possible future retransmission.
|
protected Conduit |
buildConduit(SoapMessage message,
Endpoint endpoint,
org.apache.cxf.ws.addressing.AttributedURIType to) |
protected PhaseInterceptorChain |
buildRetransmitChain(Endpoint endpoint,
PhaseChainCache cache) |
protected RetransmissionQueueImpl.ResendCandidate |
cacheUnacknowledged(Message message)
Accepts a new resend candidate.
|
int |
countUnacknowledged() |
int |
countUnacknowledged(SourceSequence seq) |
protected RetransmissionQueueImpl.ResendCandidate |
createResendCandidate(SoapMessage message) |
protected JaxbAssertion<RMAssertion> |
getAssertion(AssertionInfo ai) |
protected RetransmissionQueueImpl.Resender |
getDefaultResender()
Create default Resender logic.
|
protected int |
getExponentialBackoff() |
RMManager |
getManager() |
RetryStatus |
getRetransmissionStatus(SourceSequence seq,
long num)
Returns the retransmission status for the specified message.
|
Map<Long,RetryStatus> |
getRetransmissionStatuses(SourceSequence seq)
Return the retransmission status of all the messages assigned to the sequence.
|
protected List<RetransmissionQueueImpl.ResendCandidate> |
getSequenceCandidates(SourceSequence seq) |
protected List<RetransmissionQueueImpl.ResendCandidate> |
getSequenceCandidates(String key) |
protected Map<String,List<RetransmissionQueueImpl.ResendCandidate>> |
getUnacknowledged() |
List<Long> |
getUnacknowledgedMessageNumbers(SourceSequence seq) |
boolean |
isEmpty() |
protected boolean |
isSequenceSuspended(String key) |
void |
purgeAcknowledged(SourceSequence seq)
Purge all candidates for the given sequence that have been acknowledged.
|
void |
purgeAll(SourceSequence seq)
Purge all candidates for the given sequence.
|
protected void |
replaceResender(RetransmissionQueueImpl.Resender replacement)
Plug in replacement resend logic (facilitates unit testing).
|
void |
resume(SourceSequence seq)
Resumes the retransmission attempts for the specified sequence
|
void |
setManager(RMManager m) |
void |
start()
Initiate resends.
|
void |
stop(SourceSequence seq)
Stops resending messages for the specified source sequence.
|
void |
suspend(SourceSequence seq)
Suspends the retransmission attempts for the specified sequence
|
public RetransmissionQueueImpl(RMManager m)
public RMManager getManager()
public void setManager(RMManager m)
public void addUnacknowledged(Message message)
RetransmissionQueueaddUnacknowledged in interface RetransmissionQueuemessage - the message context.public int countUnacknowledged(SourceSequence seq)
countUnacknowledged in interface RetransmissionQueueseq - the sequence under considerationpublic int countUnacknowledged()
countUnacknowledged in interface RetransmissionQueuepublic boolean isEmpty()
isEmpty in interface RetransmissionQueuepublic void purgeAcknowledged(SourceSequence seq)
purgeAcknowledged in interface RetransmissionQueueseq - the sequence object.public void purgeAll(SourceSequence seq)
purgeAll in interface RetransmissionQueueseq - the sequence object.public List<Long> getUnacknowledgedMessageNumbers(SourceSequence seq)
getUnacknowledgedMessageNumbers in interface RetransmissionQueuepublic RetryStatus getRetransmissionStatus(SourceSequence seq, long num)
RetransmissionQueuegetRetransmissionStatus in interface RetransmissionQueuepublic Map<Long,RetryStatus> getRetransmissionStatuses(SourceSequence seq)
RetransmissionQueuegetRetransmissionStatuses in interface RetransmissionQueuepublic void start()
start in interface RetransmissionQueuepublic void stop(SourceSequence seq)
stop in interface RetransmissionQueuepublic void suspend(SourceSequence seq)
RetransmissionQueuesuspend in interface RetransmissionQueuepublic void resume(SourceSequence seq)
RetransmissionQueueresume in interface RetransmissionQueueprotected int getExponentialBackoff()
protected RetransmissionQueueImpl.ResendCandidate createResendCandidate(SoapMessage message)
message - the message contextprotected RetransmissionQueueImpl.ResendCandidate cacheUnacknowledged(Message message)
ctx - the message context.protected Map<String,List<RetransmissionQueueImpl.ResendCandidate>> getUnacknowledged()
protected List<RetransmissionQueueImpl.ResendCandidate> getSequenceCandidates(SourceSequence seq)
seq - the sequence under considerationprotected List<RetransmissionQueueImpl.ResendCandidate> getSequenceCandidates(String key)
key - the sequence identifier under considerationprotected boolean isSequenceSuspended(String key)
key - the sequence identifier under considerationprotected final RetransmissionQueueImpl.Resender getDefaultResender()
protected void replaceResender(RetransmissionQueueImpl.Resender replacement)
replacement - resend logicprotected JaxbAssertion<RMAssertion> getAssertion(AssertionInfo ai)
protected Conduit buildConduit(SoapMessage message, Endpoint endpoint, org.apache.cxf.ws.addressing.AttributedURIType to)
message - endpoint - to - protected PhaseInterceptorChain buildRetransmitChain(Endpoint endpoint, PhaseChainCache cache)
endpoint - cache - Apache CXF