com.sun.xml.ws.rm.runtime.sequence
Interface SequenceManager

All Known Implementing Classes:
PersistentSequenceManager

public interface SequenceManager


Method Summary
 void bindSequences(java.lang.String referenceSequenceId, java.lang.String boundSequenceId)
          Binds two sequences together.
 void closeSequence(java.lang.String sequenceId)
          Closes an existing sequence.
 Sequence createInboundSequence(java.lang.String sequenceId, java.lang.String strId, long expirationTime)
          Creates a new inbound sequence object
 Sequence createOutboundSequence(java.lang.String sequenceId, java.lang.String strId, long expirationTime)
          Creates a new outbound sequence object with a given Id.
 java.lang.String generateSequenceUID()
          Generates a unique identifier of a sequence
 Sequence getBoundSequence(java.lang.String referenceSequenceId)
          Retrieves a sequence previously bound to the reference sequence
 Sequence getSequence(java.lang.String sequenceId)
          Retrieves an existing sequence from the internal sequence storage
 boolean isValid(java.lang.String sequenceId)
          Provides information on whether the sequence identifier is a valid identifier that belongs to an existing sequence registered with the sequence manager.
 Sequence terminateSequence(java.lang.String sequenceId)
          Terminates an existing sequence by calling the Sequence.preDestroy() method.
 

Method Detail

closeSequence

void closeSequence(java.lang.String sequenceId)
                   throws UnknownSequenceException
Closes an existing sequence. The closed sequence is still kept in the internal sequence storage

Parameters:
sequenceId - the unique sequence identifier
Throws:
UnknownSequenceException

createOutboundSequence

Sequence createOutboundSequence(java.lang.String sequenceId,
                                java.lang.String strId,
                                long expirationTime)
                                throws DuplicateSequenceException
Creates a new outbound sequence object with a given Id. It is assumed that RM handshake has been alrady established, thus no RM handshake is performed.

Parameters:
sequenceId - identifier of the new sequence
strId - security reference token identifier which this session is bound to
expirationTime - expiration time of the sequence in milliseconds; value of com.sun.xml.ws.rm.policy.Configuration#UNSPECIFIED means that this sequence never expires.
Returns:
newly created inbound sequence
Throws:
DuplicateSequenceExcepton - in case a sequence instance with this identifier is already registered with this sequence manager
DuplicateSequenceException

createInboundSequence

Sequence createInboundSequence(java.lang.String sequenceId,
                               java.lang.String strId,
                               long expirationTime)
                               throws DuplicateSequenceException
Creates a new inbound sequence object

Parameters:
sequenceId - identifier of the new sequence
strId - security reference token identifier which this session is bound to
expirationTime - expiration time of the sequence in milliseconds; value of com.sun.xml.ws.rm.policy.Configuration#UNSPECIFIED means that this sequence never expires.
Returns:
newly created inbound sequence
Throws:
DuplicateSequenceExcepton - in case a sequence instance with this identifier is already registered with this sequence manager
DuplicateSequenceException

generateSequenceUID

java.lang.String generateSequenceUID()
Generates a unique identifier of a sequence

Returns:
new unique sequence identifier which can be used to construct a new sequence.

getSequence

Sequence getSequence(java.lang.String sequenceId)
                     throws UnknownSequenceException
Retrieves an existing sequence from the internal sequence storage

Parameters:
sequenceId - the unique sequence identifier
Returns:
sequence identified with the sequenceId identifier
Throws:
UnknownSequenceExceptio - in case no such sequence is registered within the sequence manager
UnknownSequenceException

isValid

boolean isValid(java.lang.String sequenceId)
Provides information on whether the sequence identifier is a valid identifier that belongs to an existing sequence registered with the sequence manager.

Parameters:
sequenceId - sequence identifier to be checked
Returns:
true in case the sequence identifier is valid, false otherwise

terminateSequence

Sequence terminateSequence(java.lang.String sequenceId)
                           throws UnknownSequenceException
Terminates an existing sequence by calling the Sequence.preDestroy() method. In addition to this, the terminated sequence is removed from the internal sequence storage

Parameters:
sequenceId - the unique sequence identifier
Returns:
terminated sequence object
Throws:
UnknownSequenceExceptio - in case no such sequence is registered within the sequence manager
UnknownSequenceException

bindSequences

void bindSequences(java.lang.String referenceSequenceId,
                   java.lang.String boundSequenceId)
                   throws UnknownSequenceException
Binds two sequences together. This method is mainly intended to be used for binding together request and response sequences.

Parameters:
referenceSequenceId - a reference sequence indentifier to which the other sequence shall be bound.
boundSequenceId - a bound sequence identifier
Throws:
UnknownSequenceException - in case any of the sequence identifiers does not represent a valid sequence

getBoundSequence

Sequence getBoundSequence(java.lang.String referenceSequenceId)
                          throws UnknownSequenceException
Retrieves a sequence previously bound to the reference sequence

Parameters:
referenceSequenceId - a reference sequence indentifier to which the other sequence has been bound.
Returns:
bound sequence or null in case no sequence is bound to the reference sequence
Throws:
UnknownSequenceExceptio - in case no such reference sequence is registered within the sequence manager
UnknownSequenceException