use of com.evolveum.midpoint.xml.ns._public.common.common_3.SequenceType in project cxf by apache.
the class RedeliveryQueueImpl method getRedeliveryStatus.
public RetryStatus getRedeliveryStatus(DestinationSequence seq, long num) {
List<RedeliverCandidate> sequenceCandidates = getSequenceCandidates(seq);
if (null != sequenceCandidates) {
for (int i = 0; i < sequenceCandidates.size(); i++) {
RedeliverCandidate candidate = sequenceCandidates.get(i);
RMProperties properties = RMContextUtils.retrieveRMProperties(candidate.getMessage(), false);
SequenceType st = properties.getSequence();
if (num == st.getMessageNumber()) {
return candidate;
}
}
}
return null;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.SequenceType in project cxf by apache.
the class RedeliveryQueueImpl method getUndeliveredMessageNumbers.
public List<Long> getUndeliveredMessageNumbers(DestinationSequence seq) {
List<Long> undelivered = new ArrayList<>();
List<RedeliverCandidate> sequenceCandidates = getSequenceCandidates(seq);
if (null != sequenceCandidates) {
for (int i = 0; i < sequenceCandidates.size(); i++) {
RedeliverCandidate candidate = sequenceCandidates.get(i);
RMProperties properties = RMContextUtils.retrieveRMProperties(candidate.getMessage(), false);
SequenceType st = properties.getSequence();
undelivered.add(st.getMessageNumber());
}
}
return undelivered;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.SequenceType in project cxf by apache.
the class RetransmissionQueueImpl method getDefaultResender.
/**
* Create default Resender logic.
*
* @return default Resender
*/
protected final Resender getDefaultResender() {
return new Resender() {
public void resend(Message message, boolean requestAcknowledge) {
RMProperties properties = RMContextUtils.retrieveRMProperties(message, true);
SequenceType st = properties.getSequence();
if (st != null) {
LOG.log(Level.INFO, "RESEND_MSG", st.getMessageNumber());
}
if (message instanceof SoapMessage) {
doResend((SoapMessage) message);
} else {
doResend(new SoapMessage(message));
}
}
};
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.SequenceType in project cxf by apache.
the class DestinationSequenceTest method setUpMessage.
private Message setUpMessage(String messageNr, boolean useuri) {
Message message = control.createMock(Message.class);
Exchange exchange = control.createMock(Exchange.class);
EasyMock.expect(message.getExchange()).andReturn(exchange);
EasyMock.expect(exchange.getOutMessage()).andReturn(null);
EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null);
RMProperties rmps = control.createMock(RMProperties.class);
EasyMock.expect(message.get(RMMessageConstants.RM_PROPERTIES_INBOUND)).andReturn(rmps);
SequenceType st = control.createMock(SequenceType.class);
EasyMock.expect(rmps.getSequence()).andReturn(st);
Long val = new Long(messageNr);
EasyMock.expect(st.getMessageNumber()).andReturn(val);
if (useuri) {
EasyMock.expect(rmps.getNamespaceURI()).andReturn(RM10Constants.NAMESPACE_URI);
}
return message;
}
Aggregations