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.


Constructor Summary
SandeshaUtil()
           
 
Method Summary
static org.apache.axis2.addressing.EndpointReference cloneEPR(org.apache.axis2.addressing.EndpointReference epr)
           
static org.apache.axis2.context.MessageContext cloneMessageContext(org.apache.axis2.context.MessageContext oldMsg)
           
static org.apache.axis2.context.MessageContext createNewRelatedMessageContext(RMMsgContext referenceRMMessage, org.apache.axis2.description.AxisOperation operation)
           
static void executeAndStore(RMMsgContext rmMsgContext, java.lang.String storageKey)
           
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 org.apache.axis2.description.AxisModule getAxisModule()
           
static SandeshaPolicyBean 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 StorageManager getInMemoryStorageManager(org.apache.axis2.context.ConfigurationContext context)
           
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 StorageManager getPermanentStorageManager(org.apache.axis2.context.ConfigurationContext context)
           
static PollingManager getPollingManager(org.apache.axis2.context.ConfigurationContext configurationContext)
           
static SandeshaPolicyBean 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, StorageManager storageManager)
           
static StorageManager getSandeshaStorageManager(org.apache.axis2.context.ConfigurationContext context, org.apache.axis2.description.AxisDescription description)
          Used to obtain the storage Manager Implementation.
static SecurityManager getSecurityManager(org.apache.axis2.context.ConfigurationContext context)
           
static java.lang.String getSequenceIDFromInternalSequenceID(java.lang.String internalSequenceID, StorageManager storageManager)
           
static java.lang.String getSequenceIDFromRMMessage(RMMsgContext rmMessageContext)
           
static java.lang.String getSequenceProperty(java.lang.String id, java.lang.String name, StorageManager storageManager)
           
static java.lang.String getSequencePropertyKey(RMMsgContext rmMsgContext)
          This returns the Key used when store SequencePropertyBeans for the passed message.
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 sequencePropertyKey, StorageManager storageManager)
           
static boolean isAnonymousURI(java.lang.String address)
           
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 boolean isWSRMAnonymousReplyTo(java.lang.String replyTo)
           
static void modifyExecutionChainForStoring(org.apache.axis2.context.MessageContext message)
           
static void printSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope, java.io.OutputStream out)
           
static void setAxisModule(org.apache.axis2.description.AxisModule module)
           
static void shedulePollingRequest(java.lang.String sequenceId, org.apache.axis2.context.ConfigurationContext configurationContext)
           
static java.util.ArrayList sort(java.util.ArrayList list)
           
static void startInvokerForTheSequence(org.apache.axis2.context.ConfigurationContext context, java.lang.String sequenceID)
           
static void startPollingManager(org.apache.axis2.context.ConfigurationContext configurationContext)
           
static void startSenderForTheSequence(org.apache.axis2.context.ConfigurationContext context, java.lang.String sequenceID)
           
static void stopInvoker(org.apache.axis2.context.ConfigurationContext context)
           
static void stopPollingManager(org.apache.axis2.context.ConfigurationContext configurationContext)
           
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

getAxisModule

public static org.apache.axis2.description.AxisModule getAxisModule()

setAxisModule

public static void setAxisModule(org.apache.axis2.description.AxisModule module)

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)

startPollingManager

public static void startPollingManager(org.apache.axis2.context.ConfigurationContext configurationContext)
                                throws SandeshaException
Throws:
SandeshaException

stopPollingManager

public static void stopPollingManager(org.apache.axis2.context.ConfigurationContext configurationContext)

getPollingManager

public static PollingManager getPollingManager(org.apache.axis2.context.ConfigurationContext configurationContext)

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,
                                                       org.apache.axis2.description.AxisDescription description)
                                                throws SandeshaException
Used to obtain the storage Manager Implementation.

Parameters:
context -
Returns:
Throws:
SandeshaException

getInMemoryStorageManager

public static StorageManager getInMemoryStorageManager(org.apache.axis2.context.ConfigurationContext context)
                                                throws SandeshaException
Throws:
SandeshaException

getPermanentStorageManager

public static StorageManager getPermanentStorageManager(org.apache.axis2.context.ConfigurationContext context)
                                                 throws SandeshaException
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 SandeshaPolicyBean 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,
                                                                   StorageManager storageManager)
                                                            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,
                                            StorageManager storageManager)
                                     throws SandeshaException
Parameters:
propertyKey - for the client side - internalSequenceID, for the server side - sequenceID
Returns:
Throws:
SandeshaException

getSequenceProperty

public static java.lang.String getSequenceProperty(java.lang.String id,
                                                   java.lang.String name,
                                                   StorageManager storageManager)
                                            throws SandeshaException
Throws:
SandeshaException

isAllMsgsAckedUpto

public static boolean isAllMsgsAckedUpto(long highestInMsgNo,
                                         java.lang.String sequencePropertyKey,
                                         StorageManager storageManager)
                                  throws SandeshaException
Throws:
SandeshaException

getPropertyBean

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

getSequenceIDFromRMMessage

public static java.lang.String getSequenceIDFromRMMessage(RMMsgContext rmMessageContext)
                                                   throws SandeshaException
Throws:
SandeshaException

getSecurityManager

public static SecurityManager getSecurityManager(org.apache.axis2.context.ConfigurationContext context)
                                          throws SandeshaException
Throws:
SandeshaException

getSequencePropertyKey

public static java.lang.String getSequencePropertyKey(RMMsgContext rmMsgContext)
                                               throws org.apache.axis2.AxisFault
This returns the Key used when store SequencePropertyBeans for the passed message. For the sending side this will be the internal sequence ID. For the receiving side this is the sequenceId.

Parameters:
rmMsgContext -
Returns:
Throws:
org.apache.axis2.AxisFault

isWSRMAnonymousReplyTo

public static boolean isWSRMAnonymousReplyTo(java.lang.String replyTo)

isAnonymousURI

public static boolean isAnonymousURI(java.lang.String address)

executeAndStore

public static void executeAndStore(RMMsgContext rmMsgContext,
                                   java.lang.String storageKey)
                            throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

modifyExecutionChainForStoring

public static void modifyExecutionChainForStoring(org.apache.axis2.context.MessageContext message)

cloneMessageContext

public static org.apache.axis2.context.MessageContext cloneMessageContext(org.apache.axis2.context.MessageContext oldMsg)
                                                                   throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

shedulePollingRequest

public static void shedulePollingRequest(java.lang.String sequenceId,
                                         org.apache.axis2.context.ConfigurationContext configurationContext)
                                  throws SandeshaException
Throws:
SandeshaException

cloneEPR

public static org.apache.axis2.addressing.EndpointReference cloneEPR(org.apache.axis2.addressing.EndpointReference epr)


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