Package org.opensaml.soap.soap11.messaging.impl

# Class SOAP11FaultContextDecoratingErrorHandler

java.lang.Object
org.opensaml.soap.soap11.messaging.impl.SOAP11FaultContextDecoratingErrorHandler

All Implemented Interfaces:
  `MessageErrorHandler`, `TypedMessageErrorHandler`

public class SOAP11FaultContextDecoratingErrorHandler extends Object implements TypedMessageErrorHandler
An implementation of `TypedMessageErrorHandler` which simply decorates the supplied `MessageContext` with a `Fault` and optionally a WS-Addressing Action URI.

The actual SOAP 1.1. fault is assumed to be emitted later, perhaps directly by a specialized fault-aware `MessageEncoder`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`faultActor`
The fault actor to emit.
`private QName`
`faultCode`
The fault code to emit.
`private String`
`faultString`
The fault string to emit.
`private Class<? extends Throwable>`
`handledThrowable`
The handled type of Throwable.
`private String`
`wsAddressingActionURI`
The WS-Addressing fault action URI to supply via the context.

## Constructor Summary

Constructors
Constructor
Description
`SOAP11FaultContextDecoratingErrorHandler(Class<? extends Throwable> throwable, QName code, String message)`
Constructor.
`SOAP11FaultContextDecoratingErrorHandler(Class<? extends Throwable> throwable, QName code, String message, String actor, String addressingActionURI)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`handleError(Throwable t, MessageContext messageContext)`
Handle a particular thrown error.
`boolean`
`handlesError(Throwable t)`
Indicates whether the message error handle is capable of handling the specified error.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### handledThrowable

@Nonnull private Class<? extends Throwable> handledThrowable
The handled type of Throwable.

### faultCode

@Nonnull private QName faultCode
The fault code to emit.

### faultString

@Nonnull private String faultString
The fault string to emit.

### faultActor

@Nullable private String faultActor
The fault actor to emit.

### wsAddressingActionURI

@Nullable private String wsAddressingActionURI
The WS-Addressing fault action URI to supply via the context.

## Constructor Details

### SOAP11FaultContextDecoratingErrorHandler

public SOAP11FaultContextDecoratingErrorHandler(@Nonnull Class<? extends Throwable> throwable, @Nonnull QName code, @Nonnull String message)
Constructor.

Parameters:
  `throwable` - the handled type of `Throwable`
  `code` - the fault code
  `message` - the fault string

### SOAP11FaultContextDecoratingErrorHandler

public SOAP11FaultContextDecoratingErrorHandler(@Nonnull Class<? extends Throwable> throwable, @Nonnull QName code, @Nonnull String message, @Nullable String actor, @Nullable String addressingActionURI)
Constructor.

Parameters:
  `throwable` - the handled type of `Throwable`
  `code` - the fault code
  `message` - the fault string
  `actor` - the fault actor
  `addressingActionURI` - the WS-Addressing action URI

## Method Details

### handlesError

public boolean handlesError(@Nonnull Throwable t)
Indicates whether the message error handle is capable of handling the specified error.

Specified by:
  `handlesError` in interface `TypedMessageErrorHandler`
Parameters:
  `t` - the type of error about which to query
Returns:
  true iff the handle can handle the specified error type

### handleError

public boolean handleError(@Nonnull Throwable t, @Nonnull MessageContext messageContext)
Handle a particular thrown error.

Specified by:
  `handleError` in interface `MessageErrorHandler`
Parameters:
  `t` - the error that was thrown
  `messageContext` - the message context being processed, if available
Returns:
  true if error was successfully handled, false otherwise