org.jboss.soa.esb.listeners.message.errors
Class Factory

java.lang.Object
  extended by org.jboss.soa.esb.listeners.message.errors.Factory

public class Factory
extends java.lang.Object

Factory for error messages.


Field Summary
static java.lang.String ERROR_ATTRIBUTE
           
static java.lang.String NOT_ENABLED
           
static java.lang.String PROCESSING_ERROR
           
static java.lang.String UNEXPECTED_ERROR
           
static java.lang.String VALIDATION_FAILURE
           
 
Constructor Summary
Factory()
           
 
Method Summary
static Message createErrorMessage(java.lang.String type, Message input, java.lang.Throwable problem)
          Creates an error message from the input message.
static Message createErrorMessage(java.lang.String type, java.net.URI messageType, Call call, java.lang.Throwable problem, Message defaultError)
          Creates an error message from the Call information of the input message.
static void createExceptionFromFault(Message msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_ATTRIBUTE

public static final java.lang.String ERROR_ATTRIBUTE
See Also:
Constant Field Values

PROCESSING_ERROR

public static final java.lang.String PROCESSING_ERROR
See Also:
Constant Field Values

UNEXPECTED_ERROR

public static final java.lang.String UNEXPECTED_ERROR
See Also:
Constant Field Values

NOT_ENABLED

public static final java.lang.String NOT_ENABLED
See Also:
Constant Field Values

VALIDATION_FAILURE

public static final java.lang.String VALIDATION_FAILURE
See Also:
Constant Field Values
Constructor Detail

Factory

public Factory()
Method Detail

createExceptionFromFault

public static void createExceptionFromFault(Message msg)
                                     throws FaultMessageException
Throws:
FaultMessageException

createErrorMessage

public static Message createErrorMessage(java.lang.String type,
                                         Message input,
                                         java.lang.Throwable problem)
Creates an error message from the input message.

Parameters:
type - The type of the error message.
input - The input message.
problem - The throwable content of this error message.
Returns:
An error message, or the input message if the input message has no destination information.

createErrorMessage

public static Message createErrorMessage(java.lang.String type,
                                         java.net.URI messageType,
                                         Call call,
                                         java.lang.Throwable problem,
                                         Message defaultError)
Creates an error message from the Call information of the input message.

Parameters:
type - The type of this error message.
messageType - The type of the input message.
call - The Call information of the input message
problem - The throwable content of this error message.
defaultError - The default error message.
Returns:
An error message, or the default error message if the Call has no destination information.