org.apache.sandesha2.util
Class SandeshaUtil

java.lang.Object
  extended by org.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.axiom.soap.SOAPEnvelope cloneEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
           
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(RangeString completedMessageRanges, java.lang.String rmNamespaceValue)
          Used to convert a RangeString into a set of AcknowledgementRanges.
static java.util.ArrayList getArrayListFromString(java.lang.String str)
           
static org.apache.axis2.description.AxisModule getAxisModule()
           
static ContextManager getContextManager(org.apache.axis2.context.ConfigurationContext context)
           
static SandeshaPolicyBean getDefaultPropertyBean(org.apache.axis2.engine.AxisConfiguration axisConfiguration)
           
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 SandeshaPolicyBean getPropertyBean(org.apache.axis2.description.AxisDescription axisDescription)
           
static RMDBean getRMDBeanFromSequenceId(StorageManager storageManager, java.lang.String sequenceID)
           
static RMSBean getRMSBeanFromInternalSequenceId(StorageManager storageManager, java.lang.String internalSequenceID)
           
static RMSBean getRMSBeanFromSequenceId(StorageManager storageManager, java.lang.String sequenceID)
           
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 getSequenceKeyFromInternalSequenceID(java.lang.String internalSequenceID, java.lang.String to)
           
static java.lang.String getServerSideIncomingSeqIdFromInternalSeqId(java.lang.String internalSequenceId)
           
static int getSOAPVersion(org.apache.axiom.soap.SOAPEnvelope envelope)
           
static java.lang.String getStackTraceFromException(java.lang.Exception e)
           
static java.lang.String getUUID()
          Create a new UUID.
static boolean isAllMsgsAckedUpto(long highestInMsgNo, java.lang.String internalSequenceId, StorageManager storageManager)
           
static boolean isDuplicateInOnlyMessage(org.apache.axis2.context.MessageContext msgContext)
           
static boolean isDuplicateInOutMessage(org.apache.axis2.context.MessageContext msgContext)
           
static boolean isMessageUnreliable(org.apache.axis2.context.MessageContext mc)
           
static boolean isWSRMAnonymous(java.lang.String address)
           
static void modifyExecutionChainForStoring(org.apache.axis2.context.MessageContext message)
           
static org.apache.axiom.soap.SOAPEnvelope removeMustUnderstand(org.apache.axiom.soap.SOAPEnvelope envelope)
          Remove the MustUnderstand header blocks.
static org.apache.axis2.addressing.EndpointReference rewriteEPR(RMSBean sourceBean, org.apache.axis2.addressing.EndpointReference epr, org.apache.axis2.context.ConfigurationContext configContext)
           
static void setAxisModule(org.apache.axis2.description.AxisModule module)
           
static void startWorkersForSequence(org.apache.axis2.context.ConfigurationContext context, RMSequenceBean sequence)
           
 
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(RangeString completedMessageRanges,
                                                       java.lang.String rmNamespaceValue)
                                                throws SandeshaException
Used to convert a RangeString into a set of AcknowledgementRanges.

Parameters:
msgNoStr -
factory -
Returns:
Throws:
SandeshaException

startWorkersForSequence

public static void startWorkersForSequence(org.apache.axis2.context.ConfigurationContext context,
                                           RMSequenceBean sequence)
                                    throws SandeshaException
Throws:
SandeshaException

getMessageTypeString

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

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

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)

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)

getRMSBeanFromInternalSequenceId

public static final RMSBean getRMSBeanFromInternalSequenceId(StorageManager storageManager,
                                                             java.lang.String internalSequenceID)
                                                      throws SandeshaException
Throws:
SandeshaException

getRMSBeanFromSequenceId

public static final RMSBean getRMSBeanFromSequenceId(StorageManager storageManager,
                                                     java.lang.String sequenceID)
                                              throws SandeshaException
Throws:
SandeshaException

getRMDBeanFromSequenceId

public static RMDBean getRMDBeanFromSequenceId(StorageManager storageManager,
                                               java.lang.String sequenceID)
                                        throws SandeshaException
Throws:
SandeshaException

getSequenceIDFromInternalSequenceID

public static java.lang.String getSequenceIDFromInternalSequenceID(java.lang.String internalSequenceID,
                                                                   StorageManager storageManager)
                                                            throws SandeshaException
Throws:
SandeshaException

getExecutionChainString

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

isAllMsgsAckedUpto

public static boolean isAllMsgsAckedUpto(long highestInMsgNo,
                                         java.lang.String internalSequenceId,
                                         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

getSequenceKeyFromInternalSequenceID

public static java.lang.String getSequenceKeyFromInternalSequenceID(java.lang.String internalSequenceID,
                                                                    java.lang.String to)

getSecurityManager

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

getContextManager

public static ContextManager getContextManager(org.apache.axis2.context.ConfigurationContext context)
                                        throws SandeshaException
Throws:
SandeshaException

isWSRMAnonymous

public static boolean isWSRMAnonymous(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)
                                           throws SandeshaException
Throws:
SandeshaException

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

removeMustUnderstand

public static org.apache.axiom.soap.SOAPEnvelope removeMustUnderstand(org.apache.axiom.soap.SOAPEnvelope envelope)
Remove the MustUnderstand header blocks.

Parameters:
envelope -

cloneEPR

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

isMessageUnreliable

public static boolean isMessageUnreliable(org.apache.axis2.context.MessageContext mc)

isDuplicateInOnlyMessage

public static boolean isDuplicateInOnlyMessage(org.apache.axis2.context.MessageContext msgContext)

isDuplicateInOutMessage

public static boolean isDuplicateInOutMessage(org.apache.axis2.context.MessageContext msgContext)

cloneEnvelope

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

getStackTraceFromException

public static final java.lang.String getStackTraceFromException(java.lang.Exception e)

rewriteEPR

public static org.apache.axis2.addressing.EndpointReference rewriteEPR(RMSBean sourceBean,
                                                                       org.apache.axis2.addressing.EndpointReference epr,
                                                                       org.apache.axis2.context.ConfigurationContext configContext)
                                                                throws SandeshaException
Throws:
SandeshaException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.