Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.sandesha2.util
Class FaultManager

    java.lang.Object
      org.apache.sandesha2.util.FaultManager

    public class FaultManager

extends java.lang.Object

Has logic to check for possible RM related faults and create it.

Constructor Summary
`FaultManager()`

Method Summary
`static boolean` | `checkForInvalidAcknowledgement(RMMsgContext ackRMMessageContext, SequenceAcknowledgement sequenceAcknowledgement, StorageManager storageManager, RMSBean rmsBean, boolean piggybackedMessage)` Check weather the Acknowledgement is invalid and generate a fault if it is.
`static void` | `checkForLastMsgNumberExceeded(RMMsgContext applicationRMMessage, StorageManager storageManager)` Check weather the LastMessage number has been exceeded and generate the fault if it is.
`static RMMsgContext` | `checkForMessageNumberRoleover(org.apache.axis2.context.MessageContext messageContext)`
`static boolean` | `checkForMessageRolledOver(RMMsgContext rmMessageContext, java.lang.String sequenceId, long msgNo, RMDBean bean)` Checks to see if the message number received is == to the Long.MAX_VALUE Throws and AxisFault, or sends a Fault message if the condition is met.
`static boolean` | `checkForSequenceClosed(RMMsgContext referenceRMMessage, java.lang.String sequenceID, RMDBean rmdBean, boolean piggybackedMessage)`
`static boolean` | `checkForSequenceTerminated(RMMsgContext referenceRMMessage, java.lang.String sequenceID, RMSequenceBean bean, boolean piggybackedMessage)` Checks if a sequence is terminated and returns a SequenceTerminated fault.
`static boolean` | `checkForUnknownSequence(RMMsgContext rmMessageContext, java.lang.String sequenceID, StorageManager storageManager, boolean piggybackedMessage)` Check whether a Sequence message (a) belongs to a unknown sequence (generates an UnknownSequence fault) (b) message number exceeds a predifined limit ( genenrates a Message Number Rollover fault)
`static void` | `getOrSendFault(RMMsgContext referenceRMMsgContext, FaultData data, boolean throwable, org.apache.axis2.addressing.EndpointReference acksToEPR)` Adds the necessary Fault elements as properties to the message context.
`static boolean` | `isRMFault(java.lang.String faultSubcodeValue)`
`static void` | `makeCreateSequenceRefusedFault(RMMsgContext rmMessageContext, java.lang.String detail, java.lang.Exception e, org.apache.axis2.addressing.EndpointReference acksToEPR)` Makes a Create sequence refused fault
`static void` | `makeInvalidAcknowledgementFault(RMMsgContext rmMsgCtx, SequenceAcknowledgement sequenceAcknowledgement, Range acknowledgementRange, StorageManager storageManager, boolean piggybackedMessage, org.apache.axis2.addressing.EndpointReference acksToEPR)` Makes an InvalidAcknowledgement fault.
`static void` | `makeMissingSelectionFault(RMMsgContext rmMessageContext)` Makes WSMC MissingSelectionFault
`static void` | `makeUnsupportedSelectionFault(RMMsgContext rmMessageContext, javax.xml.namespace.QName unsupportedElement)` Makes the WSMC UnsupportedSelectionFault
`static org.apache.axis2.engine.Handler.InvocationResponse` | `processMessagesForFaults(RMMsgContext rmMsgCtx, StorageManager storageManager)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FaultManager

    public FaultManager()

Method Detail

### checkForLastMsgNumberExceeded

    public static void checkForLastMsgNumberExceeded(RMMsgContext applicationRMMessage,
                                                     StorageManager storageManager)
                                              throws org.apache.axis2.AxisFault

  Check weather the LastMessage number has been exceeded and generate the fault if it is.

  Parameters:
    `msgCtx` -
  Throws:
    `org.apache.axis2.AxisFault`

### checkForMessageNumberRoleover

    public static RMMsgContext checkForMessageNumberRoleover(org.apache.axis2.context.MessageContext messageContext)

### checkForUnknownSequence

    public static boolean checkForUnknownSequence(RMMsgContext rmMessageContext,
                                                  java.lang.String sequenceID,
                                                  StorageManager storageManager,
                                                  boolean piggybackedMessage)
                                           throws org.apache.axis2.AxisFault

  Check whether a Sequence message (a) belongs to a unknown sequence (generates an UnknownSequence fault) (b) message number exceeds a predifined limit ( genenrates a Message Number Rollover fault)

  Parameters:
    `msgCtx` -
  Returns:
    true if no exception has been thrown and the sequence doesn't exist
  Throws:
    `SandeshaException`
    `org.apache.axis2.AxisFault`

### checkForInvalidAcknowledgement

    public static boolean checkForInvalidAcknowledgement(RMMsgContext ackRMMessageContext,
                                                         SequenceAcknowledgement sequenceAcknowledgement,
                                                         StorageManager storageManager,
                                                         RMSBean rmsBean,
                                                         boolean piggybackedMessage)
                                                  throws org.apache.axis2.AxisFault

  Check weather the Acknowledgement is invalid and generate a fault if it is.

  Parameters:
    `msgCtx` -
  Returns:
  Throws:
    `SandeshaException`
    `org.apache.axis2.AxisFault`

### makeInvalidAcknowledgementFault

    public static void makeInvalidAcknowledgementFault(RMMsgContext rmMsgCtx,
                                                       SequenceAcknowledgement sequenceAcknowledgement,
                                                       Range acknowledgementRange,
                                                       StorageManager storageManager,
                                                       boolean piggybackedMessage,
                                                       org.apache.axis2.addressing.EndpointReference acksToEPR)
                                                throws org.apache.axis2.AxisFault

  Makes an InvalidAcknowledgement fault.

  Parameters:
    `rmMsgCtx` -
    `storageManager` -
    `message` -
  Throws:
    `org.apache.axis2.AxisFault`

### makeCreateSequenceRefusedFault

    public static void makeCreateSequenceRefusedFault(RMMsgContext rmMessageContext,
                                                      java.lang.String detail,
                                                      java.lang.Exception e,
                                                      org.apache.axis2.addressing.EndpointReference acksToEPR)
                                               throws org.apache.axis2.AxisFault

  Makes a Create sequence refused fault

  Throws:
    `org.apache.axis2.AxisFault`

### makeUnsupportedSelectionFault

    public static void makeUnsupportedSelectionFault(RMMsgContext rmMessageContext,
                                                     javax.xml.namespace.QName unsupportedElement)
                                              throws org.apache.axis2.AxisFault

  Makes the WSMC UnsupportedSelectionFault

  Throws:
    `org.apache.axis2.AxisFault`

### makeMissingSelectionFault

    public static void makeMissingSelectionFault(RMMsgContext rmMessageContext)
                                          throws org.apache.axis2.AxisFault

  Makes WSMC MissingSelectionFault

  Throws:
    `org.apache.axis2.AxisFault`

### checkForSequenceTerminated

    public static boolean checkForSequenceTerminated(RMMsgContext referenceRMMessage,
                                                     java.lang.String sequenceID,
                                                     RMSequenceBean bean,
                                                     boolean piggybackedMessage)
                                              throws org.apache.axis2.AxisFault

  Checks if a sequence is terminated and returns a SequenceTerminated fault.

  Parameters:
    `referenceRMMessage` -
    `sequenceID` -
    `rmdBean` -
  Returns:
  Throws:
    `org.apache.axis2.AxisFault`

### checkForSequenceClosed

    public static boolean checkForSequenceClosed(RMMsgContext referenceRMMessage,
                                                 java.lang.String sequenceID,
                                                 RMDBean rmdBean,
                                                 boolean piggybackedMessage)
                                          throws org.apache.axis2.AxisFault

  Throws:
    `org.apache.axis2.AxisFault`

### getOrSendFault

    public static void getOrSendFault(RMMsgContext referenceRMMsgContext,
                                      FaultData data,
                                      boolean throwable,
                                      org.apache.axis2.addressing.EndpointReference acksToEPR)
                               throws org.apache.axis2.AxisFault

  Adds the necessary Fault elements as properties to the message context. Or if this is a SOAP11 Fault, generates the correct RM Fault and sends.

  Parameters:
    `referenceRMMsgContext` - - Message in reference to which the fault will be generated.
    `data` - - data for the fault
    `throwable` - - This tells weather or not it is ok to throw the fault out. I.e. this should not be done when processing piggybacked acks since this will stop the carrier message from being processed.
  Throws:
    `org.apache.axis2.AxisFault`

### isRMFault

    public static boolean isRMFault(java.lang.String faultSubcodeValue)

### processMessagesForFaults

    public static org.apache.axis2.engine.Handler.InvocationResponse processMessagesForFaults(RMMsgContext rmMsgCtx,
                                                                                              StorageManager storageManager)
                                                                                       throws org.apache.axis2.AxisFault

  Throws:
    `org.apache.axis2.AxisFault`

### checkForMessageRolledOver

    public static boolean checkForMessageRolledOver(RMMsgContext rmMessageContext,
                                                    java.lang.String sequenceId,
                                                    long msgNo,
                                                    RMDBean bean)
                                             throws org.apache.axis2.AxisFault

  Checks to see if the message number received is == to the Long.MAX_VALUE Throws and AxisFault, or sends a Fault message if the condition is met.

  Throws:
    `org.apache.axis2.AxisFault`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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