Package org.apache.cxf.ws.rm
Class SourceSequence
- java.lang.Object
-
- org.apache.cxf.ws.rm.AbstractSequence
-
- org.apache.cxf.ws.rm.SourceSequence
-
public class SourceSequence extends AbstractSequence
-
-
Field Summary
-
Fields inherited from class org.apache.cxf.ws.rm.AbstractSequence
acknowledgement, id
-
-
Constructor Summary
Constructors Constructor Description SourceSequence(Identifier i, Date e, Identifier oi, long cmn, boolean lm, ProtocolVariation pv)SourceSequence(Identifier i, Date e, Identifier oi, ProtocolVariation pv)SourceSequence(Identifier i, ProtocolVariation pv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallAcknowledged()Returns true if a last message had been sent for this sequence and if all messages for this sequence have been acknowledged.longgetCurrentMessageNr()StringgetEndpointIdentifier()DategetExpires()IdentifiergetOfferingSequenceIdentifier()SourcegetSource()Returns the source associated with this source sequence.org.apache.cxf.ws.addressing.EndpointReferenceTypegetTarget()booleanisLastMessage()booleanneedAcknowledge(long num)Returns true if any messages other than the number supplied are waiting for acknowledgment.longnextMessageNumber(Identifier inSeqId, long inMsgNumber, boolean last)Returns the next message number and increases the message number.booleanofferedBy(Identifier sid)Returns true if this sequence was constructed from an offer for an inbound sequence includes in the CreateSequenceRequest in response to which the sequence with the specified identifier was created.voidsetAcknowledged(SequenceAcknowledgement ack)Used by the RM source to cache received acknowledgements for this sequence.voidsetExpires(Expires ex)voidsetTarget(org.apache.cxf.ws.addressing.EndpointReferenceType to)The target for the sequence is the first non-anonymous address that a message is sent to as part of this sequence.-
Methods inherited from class org.apache.cxf.ws.rm.AbstractSequence
equals, getIdentifier, getProtocol, hashCode, identifierEquals, isAcknowledged, toString
-
-
-
-
Constructor Detail
-
SourceSequence
public SourceSequence(Identifier i, ProtocolVariation pv)
-
SourceSequence
public SourceSequence(Identifier i, Date e, Identifier oi, ProtocolVariation pv)
-
SourceSequence
public SourceSequence(Identifier i, Date e, Identifier oi, long cmn, boolean lm, ProtocolVariation pv)
-
-
Method Detail
-
getCurrentMessageNr
public long getCurrentMessageNr()
- Returns:
- the message number assigned to the most recent outgoing application message.
-
isLastMessage
public boolean isLastMessage()
- Returns:
- true if the last message had been sent for this sequence.
-
getOfferingSequenceIdentifier
public Identifier getOfferingSequenceIdentifier()
- Returns:
- the identifier of the sequence that was created on behalf of the CreateSequence request that included this sequence as an offer
-
getEndpointIdentifier
public String getEndpointIdentifier()
- Returns:
- the identifier of the rm source
-
getExpires
public Date getExpires()
- Returns:
- the expiry data of this sequence
-
offeredBy
public boolean offeredBy(Identifier sid)
Returns true if this sequence was constructed from an offer for an inbound sequence includes in the CreateSequenceRequest in response to which the sequence with the specified identifier was created.- Parameters:
sid- the sequence identifier- Returns:
- true if the sequence was constructed from an offer.
-
needAcknowledge
public boolean needAcknowledge(long num)
Returns true if any messages other than the number supplied are waiting for acknowledgment.- Parameters:
num- message number to check- Returns:
- true if all messages have been acknowledged.
-
allAcknowledged
public boolean allAcknowledged()
Returns true if a last message had been sent for this sequence and if all messages for this sequence have been acknowledged.- Returns:
- true if all messages have been acknowledged.
-
setAcknowledged
public void setAcknowledged(SequenceAcknowledgement ack) throws RMException
Used by the RM source to cache received acknowledgements for this sequence.- Parameters:
ack- an acknowledgement for this sequence- Throws:
RMException
-
getSource
public Source getSource()
Returns the source associated with this source sequence.- Returns:
- the source.
-
setExpires
public void setExpires(Expires ex)
-
nextMessageNumber
public long nextMessageNumber(Identifier inSeqId, long inMsgNumber, boolean last)
Returns the next message number and increases the message number. The parameters, if not null, indicate that this message is being sent as a response to the message with the specified message number in the sequence specified by the by the identifier, and are used to decide if this message should be the last in this sequence.- Returns:
- the next message number.
-
setTarget
public void setTarget(org.apache.cxf.ws.addressing.EndpointReferenceType to)
The target for the sequence is the first non-anonymous address that a message is sent to as part of this sequence. It is subsequently used for as the target of out-of-band protocol messages related to that sequence that originate from the sequnce source (i.e. TerminateSequence and LastMessage, but not AckRequested or SequenceAcknowledgement as these are orignate from the sequence destination).- Parameters:
to-
-
getTarget
public org.apache.cxf.ws.addressing.EndpointReferenceType getTarget()
-
-