cgl.narada.wsinfra.wsrm.impl
Class WsrmSequencePolicyFactoryImpl

java.lang.Object
  extended by cgl.narada.wsinfra.wsrm.impl.WsrmSequencePolicyFactoryImpl
All Implemented Interfaces:
WsrmSequencePolicyFactory

public class WsrmSequencePolicyFactoryImpl
extends Object
implements WsrmSequencePolicyFactory

This is a utility class which facilitates the creation of WsrmSequence Policies, and also the addition of policy elements besides the serialization/de-serialization of the policies.


Method Summary
 WsrmSequencePolicies createWsrmSequencePolicies(XmlObject xmlObject)
          Construct a sequence policies instance using the XmlCursor instance that has been provided.
 AcknowledgementIntervalDocument getAcknowledgementInterval(XmlCursor xmlCursor)
          Retrieves the acknowledgement interval from within the specified XmlCursor
 WsrmSequencePolicies getDefaultWsrmSequencePolicies()
          Get a default wsrm sequence policies element
 Calendar getExpires(XmlCursor xmlCursor)
           
 ExponentialBackoffDocument getExponentialBackoff(XmlCursor xmlCursor)
          Gets the exponential from within the specified XmlCursor
 InactivityTimeoutDocument getInactivityTimeout(XmlCursor xmlCursor)
          Retrieves the Inactivity timeout from within the specified XmlCursor
static WsrmSequencePolicyFactory getInstance()
           
 BaseRetransmissionIntervalDocument getRetransmissionInterval(XmlCursor xmlCursor)
          Retrieves the retransmission interval from within the specified XmlCursor
 SequenceRefDocument getSequenceRef(XmlCursor xmlCursor)
          Gets the SequenceRef Document from within the specified XmlCursor
 SequenceRefDocument getSequenceRefDocument(EnvelopeDocument envelopeDocument)
          Get the sequenceRef document.
 WsrmSequencePolicies getWsrmSequencePolicies(byte[] marshalledBytes)
          Create a sequence policies instance based on its marshalled representation.
 void updateExpiry(WsrmSequencePolicies wsrmSequencePolicies, Calendar expiresAt)
          Update the expiry associated with 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 WsrmSequencePolicyFactory getInstance()

createWsrmSequencePolicies

public WsrmSequencePolicies createWsrmSequencePolicies(XmlObject xmlObject)
Construct a sequence policies instance using the XmlCursor instance that has been provided.

Specified by:
createWsrmSequencePolicies in interface WsrmSequencePolicyFactory

getDefaultWsrmSequencePolicies

public WsrmSequencePolicies getDefaultWsrmSequencePolicies()
Get a default wsrm sequence policies element

Specified by:
getDefaultWsrmSequencePolicies in interface WsrmSequencePolicyFactory

updateExpiry

public void updateExpiry(WsrmSequencePolicies wsrmSequencePolicies,
                         Calendar expiresAt)
Update the expiry associated with a sequence. This can happen due to a new expiry value being specified within a Sequence element.

Specified by:
updateExpiry in interface WsrmSequencePolicyFactory

getAcknowledgementInterval

public AcknowledgementIntervalDocument getAcknowledgementInterval(XmlCursor xmlCursor)
                                                           throws ParsingException
Retrieves the acknowledgement interval from within the specified XmlCursor

Throws:
ParsingException

getRetransmissionInterval

public BaseRetransmissionIntervalDocument getRetransmissionInterval(XmlCursor xmlCursor)
                                                             throws ParsingException
Retrieves the retransmission interval from within the specified XmlCursor

Throws:
ParsingException

getInactivityTimeout

public InactivityTimeoutDocument getInactivityTimeout(XmlCursor xmlCursor)
                                               throws ParsingException
Retrieves the Inactivity timeout from within the specified XmlCursor

Throws:
ParsingException

getExponentialBackoff

public ExponentialBackoffDocument getExponentialBackoff(XmlCursor xmlCursor)
                                                 throws ParsingException
Gets the exponential from within the specified XmlCursor

Throws:
ParsingException

getSequenceRef

public SequenceRefDocument getSequenceRef(XmlCursor xmlCursor)
                                   throws ParsingException
Gets the SequenceRef Document from within the specified XmlCursor

Throws:
ParsingException

getExpires

public Calendar getExpires(XmlCursor xmlCursor)
                    throws ParsingException
Throws:
ParsingException

getWsrmSequencePolicies

public WsrmSequencePolicies getWsrmSequencePolicies(byte[] marshalledBytes)
Create a sequence policies instance based on its marshalled representation.

Specified by:
getWsrmSequencePolicies in interface WsrmSequencePolicyFactory

getSequenceRefDocument

public SequenceRefDocument getSequenceRefDocument(EnvelopeDocument envelopeDocument)
Get the sequenceRef document. The way this method works is as follows. SequenceRef elements should be contained within the wsp:AppliesTo element which in turn must be encapsulated within a PolicyAttachment element. If any of the predecessors are missing, this method will return a NULL.

Specified by:
getSequenceRefDocument in interface WsrmSequencePolicyFactory


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