Methods Summary |
---|
public void | addAckRange(long lower, long upper)
if (nack != null) {
throw new IllegalArgumentException(Messages.BOTH_ACKS_AND_NACKS_MESSAGE.format());
}
//check validity of indices
if (lower > upper) {
throw new IllegalArgumentException(Messages.UPPERBOUND_LESSTHAN_LOWERBOUND_MESSAGE.format());
}
//TODO Further validity checking
SequenceAcknowledgementElement.AcknowledgementRange range
= new SequenceAcknowledgementElement.AcknowledgementRange();
range.setLower(BigInteger.valueOf(lower));
range.setUpper(BigInteger.valueOf(upper));
getAcknowledgementRange().add(range);
|
public void | addNack(long index)
if (acknowledgementRange != null) {
throw new IllegalArgumentException(Messages.BOTH_ACKS_AND_NACKS_MESSAGE.format());
}
getNack().add(BigInteger.valueOf(index));
|
public java.util.List | getAcknowledgementRange()Gets the value of the acknowledgementRange property.
if (acknowledgementRange == null) {
acknowledgementRange = new ArrayList<SequenceAcknowledgementElement.AcknowledgementRange>();
}
return this.acknowledgementRange;
|
public java.util.List | getAny()Gets the value of the any property representing extensibility elements
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
|
public int | getBufferRemaining()
if (bufferRemaining == null) {
return -1;
}
return bufferRemaining;
|
public java.lang.String | getId()
return getIdentifier().getValue();
|
public Identifier | getIdentifier()Gets the value of the identifier property.
return identifier;
|
public java.util.List | getNack()Gets the value of the nack property.
if (nack == null) {
nack = new ArrayList<BigInteger>();
}
return this.nack;
|
public java.util.Map | getOtherAttributes()Gets a map that contains attributes that aren't bound to any typed property on this class.
return otherAttributes;
|
public void | setBufferRemaining(int value)
bufferRemaining = value;
|
public void | setId(java.lang.String id)
Identifier identifier = new Identifier();
identifier.setValue(id);
setIdentifier(identifier);
|
public void | setIdentifier(Identifier value)Sets the value of the identifier property.
this.identifier = value;
|
public java.lang.String | toString()
String ret = Messages.SEQUENCE_ACKNOWLEDGEMENT_TOSTRING_STRING.format(getId(), getBufferRemaining());
List<AcknowledgementRange> ranges = getAcknowledgementRange();
if (ranges != null) {
for (AcknowledgementRange range: ranges) {
ret += "\t\t" + range.toString() + "\n";
}
}
return ret;
|