cgl.narada.wsinfra.wsrm.storage
Class WsrmStorageEventsFactory

java.lang.Object
  extended bycgl.narada.wsinfra.wsrm.storage.WsrmStorageEventsFactory

public class WsrmStorageEventsFactory
extends Object

This is a factory class which facilitates the creation and retrieval of widgets that are needed by the protocol/storage operations that are related to WSRM.


Method Summary
 void attachPolicyToSequence(WsrmSequenceInfo wsrmSequenceInfo, WsrmSequencePolicies wsrmSequencePolicies)
          Attaches sequence policies to the sequence info
 WsrmExchange createWsrmExchange(byte[] exchangeBytes)
          Recreate a Wsrm Exchange from the serialized representation that has been specified
 WsrmExchange createWsrmExchange(int exchangeType, String sequenceIdentifier, EnvelopeDocument envelopeDocument)
          Create a Wsrm Exchange based on the specified parameters
 WsrmSequenceInfo createWsrmSequenceInfo(byte[] sequenceInfoBytes)
          Creats a WsrmSequenceInfo based on the specified parameters
 WsrmSequenceInfo createWsrmSequenceInfo(String sequenceIdentifier, String addressingIdentifier, EndpointReferenceType source, EndpointReferenceType destination, boolean isSource)
          Creats a WsrmSequenceInfo based on the specified parameters
 WsrmStorageWidget createWsrmStorageWidget(byte[] widgetBytes)
          Recreates a wsrm storage widget based on the bytes that were created using the getBytes() method in the storage widget
 WsrmStorageWidget createWsrmStorageWidget(String sequenceIdentifier, long messageNumber, boolean acknowledgementInfo, long ackTimestampInfo, EnvelopeDocument envelopeDocument)
           
 void expireSequence(WsrmSequenceInfo wsrmSequenceInfo)
          Updates the sequence info to indicate that a sequence has expired.
static WsrmStorageEventsFactory getInstance()
           
 void setLastMessageNumberOnSequence(WsrmSequenceInfo wsrmSequenceInfo, long lastMessageNumber)
          Sets information regarding the last message in a sequence
 void terminateSequence(WsrmSequenceInfo wsrmSequenceInfo, String reason)
          Updates the sequence info to indicate that a sequence has been terminated.
 void timeoutSequence(WsrmSequenceInfo wsrmSequenceInfo)
          Times out a sequence
 void updateActivityOnSequence(WsrmSequenceInfo wsrmSequenceInfo)
          Updates the activity on a sequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WsrmStorageEventsFactory getInstance()

createWsrmStorageWidget

public WsrmStorageWidget createWsrmStorageWidget(String sequenceIdentifier,
                                                 long messageNumber,
                                                 boolean acknowledgementInfo,
                                                 long ackTimestampInfo,
                                                 EnvelopeDocument envelopeDocument)
                                          throws WsrmStorageException
Throws:
WsrmStorageException

createWsrmStorageWidget

public WsrmStorageWidget createWsrmStorageWidget(byte[] widgetBytes)
Recreates a wsrm storage widget based on the bytes that were created using the getBytes() method in the storage widget


createWsrmExchange

public WsrmExchange createWsrmExchange(int exchangeType,
                                       String sequenceIdentifier,
                                       EnvelopeDocument envelopeDocument)
                                throws WsrmStorageException
Create a Wsrm Exchange based on the specified parameters

Throws:
WsrmStorageException

createWsrmExchange

public WsrmExchange createWsrmExchange(byte[] exchangeBytes)
Recreate a Wsrm Exchange from the serialized representation that has been specified


createWsrmSequenceInfo

public WsrmSequenceInfo createWsrmSequenceInfo(String sequenceIdentifier,
                                               String addressingIdentifier,
                                               EndpointReferenceType source,
                                               EndpointReferenceType destination,
                                               boolean isSource)
                                        throws WsrmStorageException
Creats a WsrmSequenceInfo based on the specified parameters

Throws:
WsrmStorageException

createWsrmSequenceInfo

public WsrmSequenceInfo createWsrmSequenceInfo(byte[] sequenceInfoBytes)
Creats a WsrmSequenceInfo based on the specified parameters


attachPolicyToSequence

public void attachPolicyToSequence(WsrmSequenceInfo wsrmSequenceInfo,
                                   WsrmSequencePolicies wsrmSequencePolicies)
                            throws WsrmStorageException
Attaches sequence policies to the sequence info

Throws:
WsrmStorageException

updateActivityOnSequence

public void updateActivityOnSequence(WsrmSequenceInfo wsrmSequenceInfo)
                              throws WsrmStorageException
Updates the activity on a sequence

Throws:
WsrmStorageException

setLastMessageNumberOnSequence

public void setLastMessageNumberOnSequence(WsrmSequenceInfo wsrmSequenceInfo,
                                           long lastMessageNumber)
                                    throws WsrmStorageException
Sets information regarding the last message in a sequence

Throws:
WsrmStorageException

timeoutSequence

public void timeoutSequence(WsrmSequenceInfo wsrmSequenceInfo)
                     throws WsrmStorageException
Times out a sequence

Throws:
WsrmStorageException

expireSequence

public void expireSequence(WsrmSequenceInfo wsrmSequenceInfo)
                    throws WsrmStorageException
Updates the sequence info to indicate that a sequence has expired.

Throws:
WsrmStorageException

terminateSequence

public void terminateSequence(WsrmSequenceInfo wsrmSequenceInfo,
                              String reason)
                       throws WsrmStorageException
Updates the sequence info to indicate that a sequence has been terminated.

Throws:
WsrmStorageException