org.apache.sandesha2.util
Class SandeshaUtil

java.lang.Object
  extended byorg.apache.sandesha2.util.SandeshaUtil

public class SandeshaUtil
extends java.lang.Object

Contains utility methods that are used in many plases of Sandesha2.

Author:
Chamikara Jayalath

Constructor Summary
SandeshaUtil()
           
 
Method Summary
static org.apache.axis2.context.MessageContext createNewRelatedMessageContext(RMMsgContext referenceRMMessage, org.apache.axis2.description.AxisOperation operation)
           
static java.util.ArrayList getAckRangeArrayList(java.lang.String msgNoStr, org.apache.axiom.soap.SOAPFactory factory, java.lang.String rmNamespaceValue)
          Used to convert a message number list (a comma seperated list of message numbers) into a set of AcknowledgementRanges.
static java.util.ArrayList getArrayListFromMsgsString(java.lang.String str)
           
static java.util.ArrayList getArrayListFromString(java.lang.String str)
           
static SandeshaPropertyBean getDefaultPropertyBean(org.apache.axis2.engine.AxisConfiguration axisConfiguration)
           
static java.util.ArrayList getExecutionChainFromString(java.lang.String executionChainStr, org.apache.axis2.context.ConfigurationContext configContext)
           
static java.lang.String getExecutionChainString(java.util.ArrayList executionChain)
           
static java.lang.String getInternalSequenceID(java.lang.String to, java.lang.String sequenceKey)
           
static java.lang.String getMessageTypeString(int messageType)
           
static java.lang.String getOutgoingSideInternalSequenceID(java.lang.String sequenceID)
           
static SandeshaPropertyBean getPropertyBean(org.apache.axis2.description.AxisDescription axisDescription)
           
static javax.xml.namespace.QName getQNameFromString(java.lang.String qnameStr)
           
static java.lang.String getRMVersion(java.lang.String propertyKey, org.apache.axis2.context.ConfigurationContext configurationContext)
           
static StorageManager getSandeshaStorageManager(org.apache.axis2.context.ConfigurationContext context)
          Used to obtain the storage Manager Implementation.
static java.lang.String getSequenceIDFromInternalSequenceID(java.lang.String internalSequenceID, org.apache.axis2.context.ConfigurationContext configurationContext)
           
static java.lang.String getSequenceIDFromRMMessage(RMMsgContext rmMessageContext)
           
static java.lang.String getSequenceProperty(java.lang.String id, java.lang.String name, org.apache.axis2.context.ConfigurationContext context)
           
static java.lang.String getServerSideIncomingSeqIdFromInternalSeqId(java.lang.String internalSequenceId)
           
static int getSOAPVersion(org.apache.axiom.soap.SOAPEnvelope envelope)
           
static java.util.ArrayList getSplittedMsgNoArraylist(java.lang.String str)
           
static java.lang.String getStringFromQName(javax.xml.namespace.QName name)
           
static java.lang.String getUUID()
          Create a new UUID.
static boolean isAllMsgsAckedUpto(long highestInMsgNo, java.lang.String internalSequenceID, org.apache.axis2.context.ConfigurationContext configCtx)
           
static boolean isDuplicateDropRequiredMsgType(int rmMessageType)
           
static boolean isGloballyProcessableMessageType(int type)
           
static boolean isRetriableOnFaults(org.apache.axis2.context.MessageContext msgCtx)
           
static boolean isRMGlobalMessage(org.apache.axis2.context.MessageContext msgCtx)
           
static void printSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope, java.io.OutputStream out)
           
static java.util.ArrayList sort(java.util.ArrayList list)
           
static void startInvokerForTheSequence(org.apache.axis2.context.ConfigurationContext context, java.lang.String sequenceID)
           
static void startSenderForTheSequence(org.apache.axis2.context.ConfigurationContext context, java.lang.String sequenceID)
           
static void stopInvoker(org.apache.axis2.context.ConfigurationContext context)
           
static void stopSender(org.apache.axis2.context.ConfigurationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SandeshaUtil

public SandeshaUtil()
Method Detail

getUUID

public static java.lang.String getUUID()
Create a new UUID.

Returns:

getAckRangeArrayList

public static java.util.ArrayList getAckRangeArrayList(java.lang.String msgNoStr,
                                                       org.apache.axiom.soap.SOAPFactory factory,
                                                       java.lang.String rmNamespaceValue)
                                                throws SandeshaException
Used to convert a message number list (a comma seperated list of message numbers) into a set of AcknowledgementRanges. This breaks the list, sort the items and group them to create the AcknowledgementRange objects.

Parameters:
msgNoStr -
factory -
Returns:
Throws:
SandeshaException

sort

public static java.util.ArrayList sort(java.util.ArrayList list)

startSenderForTheSequence

public static void startSenderForTheSequence(org.apache.axis2.context.ConfigurationContext context,
                                             java.lang.String sequenceID)

stopSender

public static void stopSender(org.apache.axis2.context.ConfigurationContext context)

startInvokerForTheSequence

public static void startInvokerForTheSequence(org.apache.axis2.context.ConfigurationContext context,
                                              java.lang.String sequenceID)

stopInvoker

public static void stopInvoker(org.apache.axis2.context.ConfigurationContext context)

getMessageTypeString

public static java.lang.String getMessageTypeString(int messageType)

isGloballyProcessableMessageType

public static boolean isGloballyProcessableMessageType(int type)

isDuplicateDropRequiredMsgType

public static boolean isDuplicateDropRequiredMsgType(int rmMessageType)

getSplittedMsgNoArraylist

public static java.util.ArrayList getSplittedMsgNoArraylist(java.lang.String str)

getServerSideIncomingSeqIdFromInternalSeqId

public static java.lang.String getServerSideIncomingSeqIdFromInternalSeqId(java.lang.String internalSequenceId)
                                                                    throws SandeshaException
Throws:
SandeshaException

getSandeshaStorageManager

public static StorageManager getSandeshaStorageManager(org.apache.axis2.context.ConfigurationContext context)
                                                throws SandeshaException
Used to obtain the storage Manager Implementation.

Parameters:
context -
Returns:
Throws:
SandeshaException

getSOAPVersion

public static int getSOAPVersion(org.apache.axiom.soap.SOAPEnvelope envelope)
                          throws SandeshaException
Throws:
SandeshaException

isRMGlobalMessage

public static boolean isRMGlobalMessage(org.apache.axis2.context.MessageContext msgCtx)

isRetriableOnFaults

public static boolean isRetriableOnFaults(org.apache.axis2.context.MessageContext msgCtx)

createNewRelatedMessageContext

public static org.apache.axis2.context.MessageContext createNewRelatedMessageContext(RMMsgContext referenceRMMessage,
                                                                                     org.apache.axis2.description.AxisOperation operation)
                                                                              throws SandeshaException
Throws:
SandeshaException

getDefaultPropertyBean

public static SandeshaPropertyBean getDefaultPropertyBean(org.apache.axis2.engine.AxisConfiguration axisConfiguration)
                                                   throws SandeshaException
Throws:
SandeshaException

getArrayListFromString

public static java.util.ArrayList getArrayListFromString(java.lang.String str)
                                                  throws SandeshaException
Throws:
SandeshaException

getArrayListFromMsgsString

public static java.util.ArrayList getArrayListFromMsgsString(java.lang.String str)
                                                      throws SandeshaException
Throws:
SandeshaException

getInternalSequenceID

public static java.lang.String getInternalSequenceID(java.lang.String to,
                                                     java.lang.String sequenceKey)

getOutgoingSideInternalSequenceID

public static java.lang.String getOutgoingSideInternalSequenceID(java.lang.String sequenceID)

getSequenceIDFromInternalSequenceID

public static java.lang.String getSequenceIDFromInternalSequenceID(java.lang.String internalSequenceID,
                                                                   org.apache.axis2.context.ConfigurationContext configurationContext)
                                                            throws SandeshaException
Throws:
SandeshaException

getQNameFromString

public static javax.xml.namespace.QName getQNameFromString(java.lang.String qnameStr)
                                                    throws SandeshaException
Throws:
SandeshaException

getStringFromQName

public static java.lang.String getStringFromQName(javax.xml.namespace.QName name)

getExecutionChainString

public static java.lang.String getExecutionChainString(java.util.ArrayList executionChain)

getExecutionChainFromString

public static java.util.ArrayList getExecutionChainFromString(java.lang.String executionChainStr,
                                                              org.apache.axis2.context.ConfigurationContext configContext)
                                                       throws SandeshaException
Throws:
SandeshaException

printSOAPEnvelope

public static void printSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope,
                                     java.io.OutputStream out)
                              throws SandeshaException
Throws:
SandeshaException

getRMVersion

public static java.lang.String getRMVersion(java.lang.String propertyKey,
                                            org.apache.axis2.context.ConfigurationContext configurationContext)
                                     throws SandeshaException
Parameters:
propertyKey - for the client side - internalSequenceID, for the server side - sequenceID
configurationContext -
Returns:
Throws:
SandeshaException

getSequenceProperty

public static java.lang.String getSequenceProperty(java.lang.String id,
                                                   java.lang.String name,
                                                   org.apache.axis2.context.ConfigurationContext context)
                                            throws SandeshaException
Throws:
SandeshaException

isAllMsgsAckedUpto

public static boolean isAllMsgsAckedUpto(long highestInMsgNo,
                                         java.lang.String internalSequenceID,
                                         org.apache.axis2.context.ConfigurationContext configCtx)
                                  throws SandeshaException
Throws:
SandeshaException

getPropertyBean

public static SandeshaPropertyBean getPropertyBean(org.apache.axis2.description.AxisDescription axisDescription)
                                            throws SandeshaException
Throws:
SandeshaException

getSequenceIDFromRMMessage

public static java.lang.String getSequenceIDFromRMMessage(RMMsgContext rmMessageContext)


Copyright © 2005-2006 Apache Web Services. All Rights Reserved.