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 RMMsgContext createResponseRMMessage(RMMsgContext referenceRMMessage)
           
static org.apache.axis2.soap.SOAPEnvelope createSOAPMessage(org.apache.axis2.context.MessageContext msgContext, java.lang.String soapNamespaceURI)
           
static java.util.ArrayList getAckRangeArrayList(java.lang.String msgNoStr, org.apache.axis2.soap.SOAPFactory factory)
          Used to convert a message number list (a comma seperated list of message numbers) into a set of AcknowledgementRanges.
static java.lang.String getMessageTypeString(int messageType)
           
static StorageManager getSandeshaStorageManager(org.apache.axis2.context.ConfigurationContext context)
          Used to obtain the storage Manager Implementation.
static java.lang.String getServerSideIncomingSeqIdFromInternalSeqId(java.lang.String internalSequenceId)
           
static java.lang.String getServerSideInternalSeqIdFromIncomingSeqId(java.lang.String incomingSequenceId)
           
static int getSOAPVersion(org.apache.axis2.soap.SOAPEnvelope envelope)
           
static java.util.ArrayList getSplittedMsgNoArraylist(java.lang.String str)
           
static org.apache.axis2.context.MessageContext getStoredMessageContext(java.lang.String key)
          Retrieve the MessageContexts saved by the above method.
static java.lang.String getUUID()
          Create a new UUID.
static boolean isDuplicateDropRequiredMsgType(int rmMessageType)
           
static boolean isGloballyProcessableMessageType(int type)
           
static boolean isRMGlobalMessage(org.apache.axis2.context.MessageContext msgCtx)
           
static java.util.ArrayList sort(java.util.ArrayList list)
           
static void startInvokerIfStopped(org.apache.axis2.context.ConfigurationContext context)
           
static void startSenderIfStopped(org.apache.axis2.context.ConfigurationContext context)
           
static java.lang.String storeMessageContext(org.apache.axis2.context.MessageContext ctx)
          Used to store message context objects.
static boolean verifySequenceCompletion(java.util.Iterator ackRangesIterator, long lastMessageNo)
           
 
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.axis2.soap.SOAPFactory factory)
                                                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)

storeMessageContext

public static java.lang.String storeMessageContext(org.apache.axis2.context.MessageContext ctx)
                                            throws SandeshaException
Used to store message context objects. Currently they are stored in a in-memory HashMap. Returned key can be used to retrieve the message context.

Parameters:
ctx -
Returns:
Throws:
SandeshaException

getStoredMessageContext

public static org.apache.axis2.context.MessageContext getStoredMessageContext(java.lang.String key)
Retrieve the MessageContexts saved by the above method.

Parameters:
key -
Returns:

startSenderIfStopped

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

startInvokerIfStopped

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

verifySequenceCompletion

public static boolean verifySequenceCompletion(java.util.Iterator ackRangesIterator,
                                               long lastMessageNo)

createSOAPMessage

public static org.apache.axis2.soap.SOAPEnvelope createSOAPMessage(org.apache.axis2.context.MessageContext msgContext,
                                                                   java.lang.String soapNamespaceURI)
                                                            throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

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)

getServerSideInternalSeqIdFromIncomingSeqId

public static java.lang.String getServerSideInternalSeqIdFromIncomingSeqId(java.lang.String incomingSequenceId)

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.axis2.soap.SOAPEnvelope envelope)
                          throws SandeshaException
Throws:
SandeshaException

isRMGlobalMessage

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

createResponseRMMessage

public static RMMsgContext createResponseRMMessage(RMMsgContext referenceRMMessage)
                                            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


Copyright © 2005 Apache Web Services. All Rights Reserved.