Apache CXF API

org.apache.cxf.ws.rm
Class SourceSequence

java.lang.Object
  extended by org.apache.cxf.ws.rm.AbstractSequence
      extended by 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
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
 boolean allAcknowledged()
          Returns true if a last message had been sent for this sequence and if all messages for this sequence have been acknowledged.
 long getCurrentMessageNr()
           
 String getEndpointIdentifier()
           
 Date getExpires()
           
 Identifier getOfferingSequenceIdentifier()
           
 Source getSource()
          Returns the source associated with this source sequence.
 boolean isLastMessage()
           
 boolean needAcknowledge(long num)
          Returns true if any messages other than the number supplied are waiting for acknowledgment.
 long nextMessageNumber(Identifier inSeqId, long inMsgNumber, boolean last)
          Returns the next message number and increases the message number.
 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.
 void setAcknowledged(SequenceAcknowledgement a)
          Used by the RM source to cache received acknowledgements for this sequence.
 void setExpires(Expires ex)
           
 
Methods inherited from class org.apache.cxf.ws.rm.AbstractSequence
equals, getIdentifier, getProtocol, hashCode, identifierEquals, isAcknowledged, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
id - 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 a)
                     throws RMException
Used by the RM source to cache received acknowledgements for this sequence.

Parameters:
acknowledgement - 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.

Apache CXF API

Apache CXF