Methods Summary |
---|
public synchronized com.sun.xml.ws.rm.protocol.SequenceAcknowledgementElement | generateSequenceAcknowledgement(com.sun.xml.ws.rm.protocol.AckRequestedElement reqElement, javax.xml.bind.Marshaller marshaller)Construct a SequenceAcknowlegementElement based on the contents of this sequence.
SequenceAcknowledgementElement ackElement=
new SequenceAcknowledgementElement();
Identifier id = new Identifier();
id.setValue(getId());
ackElement.setIdentifier(id);
if (config != null && config.flowControl) {
ackElement.setBufferRemaining(maxMessages - storedMessages);
}
int maxMessageNumber = 0;
if (reqElement != null) {
maxMessageNumber = (int)(reqElement.getMaxMessageNumber());
}
//if max message number element is not present, use the last
//index we know of.
if (maxMessageNumber == 0) {
maxMessageNumber = nextIndex - 1;
}
int lower = 1;
int current = 1;
boolean gap = (get(current) == null);
while (current <= maxMessageNumber) {
if (gap) {
if (get(current) != null) {
lower = current;
gap = false;
}
} else {
if (get(current) == null) {
ackElement.addAckRange(lower, current - 1);
gap = true;
}
}
current++;
}
if (!gap) {
ackElement.addAckRange(lower, current - 1);
}
return ackElement;
|
public OutboundSequence | getOutboundSequence()Accessor for the companion OutboundSequence
return outboundSequence;
|
public SequenceConfig | getSequenceConfig()
return config;
|
public java.lang.String | getSessionId()
return strId != null ? strId : getId();
|
public java.lang.String | getStrId()
return strId;
|
public synchronized void | handleAckRequested(com.sun.xml.ws.rm.protocol.AckRequestedElement reqElement, javax.xml.bind.Marshaller marshaller)Queue up a SequenceAcknowledgement element on companion OutboundSequence
for delivery on next outbound application message.
TODO
Currently only works for replyTo = AcksTo scenarios. Expand functionality to allow AcksTo
to different destination.
SequenceAcknowledgementElement ackElement =
generateSequenceAcknowledgement(reqElement,
marshaller);
outboundSequence.setSequenceAcknowledgement(ackElement);
|
public void | setStrId(java.lang.String strId)
this.strId = strId;
|