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)` 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)` 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)` Makes a Create sequence refused fault
`static void` | `makeInvalidAcknowledgementFault(RMMsgContext rmMsgCtx, SequenceAcknowledgement sequenceAcknowledgement, AcknowledgementRange acknowledgementRange, StorageManager storageManager, boolean piggybackedMessage)` Makes an InvalidAcknowledgement fault.
`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.

  Returns:
  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)

  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.

  Returns:
  Throws:
    `SandeshaException`
    `org.apache.axis2.AxisFault`

### makeInvalidAcknowledgementFault

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

  Makes an InvalidAcknowledgement fault.

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

### makeCreateSequenceRefusedFault

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

  Makes a Create sequence refused fault

  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` -
  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)
                               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.
  Returns:
    - The dummy fault to be thrown out.
  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)
                                             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.