cgl.narada.wsinfra.wsrm.storage.impl
Class WsrmSequenceInfoImpl

java.lang.Object
  extended by cgl.narada.wsinfra.wsrm.storage.impl.WsrmSequenceInfoImpl
All Implemented Interfaces:
WsrmSequenceInfo

public class WsrmSequenceInfoImpl
extends Object
implements WsrmSequenceInfo

This interface encapsulates information pertaining to a sequence. These include,
(a) Its creation date
(b) Its Sequence Identifier and the addressing identifier
(c) The addressing identifier associated with the sequence creation request. The addressing identifier is different for different messages in a sequence. But sequence creation requests and responses, acknowledgement on the last message in a sequence, and finally the termination of a sequence all carry the same addressing identifier.


Constructor Summary
WsrmSequenceInfoImpl(byte[] marshalledBytes)
           
WsrmSequenceInfoImpl(Date creationDate, String sequenceIdentifier, String addressingIdentifier, EndpointReferenceType source, EndpointReferenceType destination, boolean isSource)
           
 
Method Summary
 String getAddressingIdentifier()
          Retrieve the addressing identifier.
 byte[] getBytes()
          Get a byte representation of the WsrmSequenceInfo
 Date getCreationDate()
          Retrieve the creation date for the sequence
 EndpointReferenceType getDestination()
          Returns the destination of this sequence
 long getLastMessageNumber()
          If we do have information regarding the last message of a sequence, proceed to retrieve it
 String getSequenceIdentifier()
          Retrieve the sequence identifier.
 EndpointReferenceType getSource()
          Returns the source of this sequence
 String getTerminationReason()
          Get the reason for termination
 long getTerminationTimestamp()
          Retrieve the termination timestamp
 long getTimeOfLastActivity()
          Retrieve the time associated with the last activity
 long getTimeoutTimestamp()
          Retrieve the timeout timestamp
 WsrmSequencePolicies getWsrmSequencePolicies()
           
 boolean hasLastMessageInfo()
          Check to see if we have information regarding the last message of a sequence.
 boolean hasWsrmSequencePolicies()
          Check if there is a policy attachment
 boolean isDestination()
          Checks if this node is the destination of the sequence in question
 boolean isExpired()
          Checks to see if the sequence has expired
 boolean isSource()
          Checks if this node is the source of the sequence in question
 boolean isTerminated()
          Check to see if the sequence is terminated
 boolean isTimedOut()
          Checks to see if the sequence is timed out
 void setExpired()
           
 void setLastMessageNumber(long lastMessageNumber)
           
 void setTermination(String reason)
           
 void setTimedOut()
           
 void setTimeOfLastActivity(long timeOfLastActivity)
           
 void setWsrmSequencePolicies(WsrmSequencePolicies wsrmSequencePolicies)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WsrmSequenceInfoImpl

public WsrmSequenceInfoImpl(Date creationDate,
                            String sequenceIdentifier,
                            String addressingIdentifier,
                            EndpointReferenceType source,
                            EndpointReferenceType destination,
                            boolean isSource)

WsrmSequenceInfoImpl

public WsrmSequenceInfoImpl(byte[] marshalledBytes)
Method Detail

getCreationDate

public Date getCreationDate()
Retrieve the creation date for the sequence

Specified by:
getCreationDate in interface WsrmSequenceInfo

getSequenceIdentifier

public String getSequenceIdentifier()
Retrieve the sequence identifier.

Specified by:
getSequenceIdentifier in interface WsrmSequenceInfo

getAddressingIdentifier

public String getAddressingIdentifier()
Retrieve the addressing identifier. More specifically this refers to the addressing identifier associated with the sequence creation request. The addressing identifier is different for different messages within a sequence. But sequence creation requests and responses, acknowledgement on the last message in a sequence, and finally the termination of a sequence all carry the same addressing identifier.

Specified by:
getAddressingIdentifier in interface WsrmSequenceInfo

getSource

public EndpointReferenceType getSource()
Returns the source of this sequence

Specified by:
getSource in interface WsrmSequenceInfo

getDestination

public EndpointReferenceType getDestination()
Returns the destination of this sequence

Specified by:
getDestination in interface WsrmSequenceInfo

isSource

public boolean isSource()
Checks if this node is the source of the sequence in question

Specified by:
isSource in interface WsrmSequenceInfo

isDestination

public boolean isDestination()
Checks if this node is the destination of the sequence in question

Specified by:
isDestination in interface WsrmSequenceInfo

hasWsrmSequencePolicies

public boolean hasWsrmSequencePolicies()
Check if there is a policy attachment

Specified by:
hasWsrmSequencePolicies in interface WsrmSequenceInfo

getWsrmSequencePolicies

public WsrmSequencePolicies getWsrmSequencePolicies()
Specified by:
getWsrmSequencePolicies in interface WsrmSequenceInfo

setWsrmSequencePolicies

public void setWsrmSequencePolicies(WsrmSequencePolicies wsrmSequencePolicies)

hasLastMessageInfo

public boolean hasLastMessageInfo()
Check to see if we have information regarding the last message of a sequence.

Specified by:
hasLastMessageInfo in interface WsrmSequenceInfo

getLastMessageNumber

public long getLastMessageNumber()
If we do have information regarding the last message of a sequence, proceed to retrieve it

Specified by:
getLastMessageNumber in interface WsrmSequenceInfo

setLastMessageNumber

public void setLastMessageNumber(long lastMessageNumber)

isExpired

public boolean isExpired()
Checks to see if the sequence has expired

Specified by:
isExpired in interface WsrmSequenceInfo

setExpired

public void setExpired()

isTimedOut

public boolean isTimedOut()
Checks to see if the sequence is timed out

Specified by:
isTimedOut in interface WsrmSequenceInfo

getTimeOfLastActivity

public long getTimeOfLastActivity()
Retrieve the time associated with the last activity

Specified by:
getTimeOfLastActivity in interface WsrmSequenceInfo

setTimeOfLastActivity

public void setTimeOfLastActivity(long timeOfLastActivity)

setTimedOut

public void setTimedOut()

getTimeoutTimestamp

public long getTimeoutTimestamp()
Retrieve the timeout timestamp

Specified by:
getTimeoutTimestamp in interface WsrmSequenceInfo

isTerminated

public boolean isTerminated()
Check to see if the sequence is terminated

Specified by:
isTerminated in interface WsrmSequenceInfo

getTerminationTimestamp

public long getTerminationTimestamp()
Retrieve the termination timestamp

Specified by:
getTerminationTimestamp in interface WsrmSequenceInfo

getTerminationReason

public String getTerminationReason()
Get the reason for termination

Specified by:
getTerminationReason in interface WsrmSequenceInfo

setTermination

public void setTermination(String reason)

getBytes

public byte[] getBytes()
Get a byte representation of the WsrmSequenceInfo

Specified by:
getBytes in interface WsrmSequenceInfo

toString

public String toString()
Overrides:
toString in class Object


For comments and suggestions please send e-mail to The NaradaBrokering Project