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

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

public class WsrmSequenceInfoStorageOperationsImpl
extends Object
implements WsrmSequenceInfoStorageOperations

Title: WsrmSequenceInfoStorageOperationsImpl

Description: Handles Sequence Info Storage operations


Constructor Summary
WsrmSequenceInfoStorageOperationsImpl()
           
WsrmSequenceInfoStorageOperationsImpl(Connection connection)
           
 
Method Summary
 void addDestinationSequenceIdentifierPair(String destination, String sequenceIdentifier)
          Stores the sequence identifier that should be used while communicating with a given destination (based on the contents of the wsa:To element).
 String getDestinationForSequenceIdentifier(String sequenceIdentifier)
          Retrieves the destination for a specific sequence identifier
 String[] getListOfActiveSequences(boolean source)
          Retrieves the list of active sent/received sequences that are currently available at this node.
 String[] getListOfAllSequences(boolean source)
          Retrieves the entire list of sent/received sequence identifiers registered with the underlying service.
 String[] getListOfExpiredSequences(boolean source)
          Retrieves the list of sent/received sequences that have expired.
 String[] getListOfServicedSequences(boolean source)
          Retrieves the list of sent/received sequences that have been acknowledged and were successfully terminated.
 String[] getListOfTerminatedSequences(boolean source)
          Retrieves the list of sent/received sequences that have terminated.
 String[] getListOfTimedOutSequences(boolean source)
          Retrieves the list of sent/received sequences that have timed-out.
 String getSequenceIdentifierForDestination(String destination)
          Retrieve the sequence identifier for a specific destination
 WsrmSequenceInfo getSequenceInfoUsingAddressingIdentifier(String addressingIdentifier)
          Retrieves the SequenceInfo corresponding to the specified addressingIdentifier.
 WsrmSequenceInfo getSequenceInfoUsingSequenceIdentifier(String sequenceIdentifier)
          Retrieves the SequenceInfo corresponding to the specified sequenceIdentifier.
 WsrmSequenceInfo[] getSequenceInfoUsingSequencePrefix(String sequenceIdentifier)
          Retrieves the SequenceInfo corresponding to the ACTIVE sequences with the specified sequenceIdentifier prefix.
 boolean hasSequenceIdForDestination(String destination)
          Checks to see if there is a sequenceId/destination pair corresponding to the destination in question.
 boolean isKnownSequence(String sequenceIdentifier)
          A method which checks whether a certain sequence (irrespective of whether it is active/terminated/expired/timed-out) is a known sequence at this node
static void main(String[] args)
           
 void removeDestinationSequenceIdentifierPair(String destination)
          Removes the destination/sequence identifier pair corresponding to this destination
 void storeCreatedSequence(WsrmSequenceInfo sequenceInfo)
          Store a SequenceInfo object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsrmSequenceInfoStorageOperationsImpl

public WsrmSequenceInfoStorageOperationsImpl()

WsrmSequenceInfoStorageOperationsImpl

public WsrmSequenceInfoStorageOperationsImpl(Connection connection)
Method Detail

addDestinationSequenceIdentifierPair

public void addDestinationSequenceIdentifierPair(String destination,
                                                 String sequenceIdentifier)
                                          throws WsrmStorageException
Stores the sequence identifier that should be used while communicating with a given destination (based on the contents of the wsa:To element). This feature allows us to send messages reliably with minimal intervention from the application.

Specified by:
addDestinationSequenceIdentifierPair in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getSequenceIdentifierForDestination

public String getSequenceIdentifierForDestination(String destination)
                                           throws WsrmStorageException
Retrieve the sequence identifier for a specific destination

Specified by:
getSequenceIdentifierForDestination in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getDestinationForSequenceIdentifier

public String getDestinationForSequenceIdentifier(String sequenceIdentifier)
                                           throws WsrmStorageException
Retrieves the destination for a specific sequence identifier

Specified by:
getDestinationForSequenceIdentifier in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

removeDestinationSequenceIdentifierPair

public void removeDestinationSequenceIdentifierPair(String destination)
                                             throws WsrmStorageException
Removes the destination/sequence identifier pair corresponding to this destination

Specified by:
removeDestinationSequenceIdentifierPair in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

hasSequenceIdForDestination

public boolean hasSequenceIdForDestination(String destination)
                                    throws WsrmStorageException
Checks to see if there is a sequenceId/destination pair corresponding to the destination in question.

Specified by:
hasSequenceIdForDestination in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

isKnownSequence

public boolean isKnownSequence(String sequenceIdentifier)
                        throws WsrmStorageException
A method which checks whether a certain sequence (irrespective of whether it is active/terminated/expired/timed-out) is a known sequence at this node

Specified by:
isKnownSequence in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

storeCreatedSequence

public void storeCreatedSequence(WsrmSequenceInfo sequenceInfo)
                          throws WsrmStorageException
Store a SequenceInfo object. This method throws an exception under the following circumstances
The sequenceIdentifier in the SequenceInfo already exists.
Storage related problems

Specified by:
storeCreatedSequence in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getSequenceInfoUsingSequenceIdentifier

public WsrmSequenceInfo getSequenceInfoUsingSequenceIdentifier(String sequenceIdentifier)
                                                        throws WsrmStorageException
Retrieves the SequenceInfo corresponding to the specified sequenceIdentifier. This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
Storage related problems

Specified by:
getSequenceInfoUsingSequenceIdentifier in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getSequenceInfoUsingSequencePrefix

public WsrmSequenceInfo[] getSequenceInfoUsingSequencePrefix(String sequenceIdentifier)
                                                      throws WsrmStorageException
Retrieves the SequenceInfo corresponding to the ACTIVE sequences with the specified sequenceIdentifier prefix. This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
Storage related problems

Specified by:
getSequenceInfoUsingSequencePrefix in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getSequenceInfoUsingAddressingIdentifier

public WsrmSequenceInfo getSequenceInfoUsingAddressingIdentifier(String addressingIdentifier)
                                                          throws WsrmStorageException
Retrieves the SequenceInfo corresponding to the specified addressingIdentifier. This method throws an exception under the following conditions.
The Sequence specified in addressingIdentifier is an unknown one.
Storage related problems

Specified by:
getSequenceInfoUsingAddressingIdentifier in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getListOfAllSequences

public String[] getListOfAllSequences(boolean source)
                               throws WsrmStorageException
Retrieves the entire list of sent/received sequence identifiers registered with the underlying service. This method throws an exception if there are storage related problems.

Specified by:
getListOfAllSequences in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getListOfExpiredSequences

public String[] getListOfExpiredSequences(boolean source)
                                   throws WsrmStorageException
Retrieves the list of sent/received sequences that have expired. This method throws an exception if there are storage related problems.

Specified by:
getListOfExpiredSequences in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getListOfTimedOutSequences

public String[] getListOfTimedOutSequences(boolean source)
                                    throws WsrmStorageException
Retrieves the list of sent/received sequences that have timed-out. This method throws an exception if there are storage related problems.

Specified by:
getListOfTimedOutSequences in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getListOfTerminatedSequences

public String[] getListOfTerminatedSequences(boolean source)
                                      throws WsrmStorageException
Retrieves the list of sent/received sequences that have terminated. This method throws an exception if there are storage related problems.

Specified by:
getListOfTerminatedSequences in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getListOfServicedSequences

public String[] getListOfServicedSequences(boolean source)
                                    throws WsrmStorageException
Retrieves the list of sent/received sequences that have been acknowledged and were successfully terminated. These sequences are ones where the sequence DID NOT EXPIRE or had an INACTIVITY_TIMEOUT. Also the LAST MESSAGE information should be present. This method throws an exception if there are storage related problems.

Specified by:
getListOfServicedSequences in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

getListOfActiveSequences

public String[] getListOfActiveSequences(boolean source)
                                  throws WsrmStorageException
Retrieves the list of active sent/received sequences that are currently available at this node. This method throws an exception if there are storage related problems.

Specified by:
getListOfActiveSequences in interface WsrmSequenceInfoStorageOperations
Throws:
WsrmStorageException

main

public static void main(String[] args)


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