Spring Web Services Framework

org.springframework.ws.server.endpoint
Class AbstractEndpointExceptionResolver

java.lang.Object
  extended by org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
All Implemented Interfaces:
Ordered, EndpointExceptionResolver
Direct Known Subclasses:
AbstractSoapFaultDefinitionExceptionResolver, SimpleSoapExceptionResolver

public abstract class AbstractEndpointExceptionResolver
extends Object
implements EndpointExceptionResolver, Ordered

Abstract base class for EndpointExceptionResolvers.

Provides a set of mapped endpoints that the resolver should map.

Since:
1.0.0
Author:
Arjen Poutsma

Field Summary
protected  Log logger
          Shared Log for subclasses to use.
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AbstractEndpointExceptionResolver()
           
 
Method Summary
 int getOrder()
           
 boolean resolveException(MessageContext messageContext, Object endpoint, Exception ex)
          Default implementation that checks whether the given endpoint is in the set of mapped endpoints.
protected abstract  boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex)
          Template method for resolving exceptions that is called by resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception).
 void setMappedEndpoints(Set mappedEndpoints)
          Specify the set of endpoints that this exception resolver should map.
 void setOrder(int order)
          Specify the order value for this mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger
Shared Log for subclasses to use.

Constructor Detail

AbstractEndpointExceptionResolver

public AbstractEndpointExceptionResolver()
Method Detail

setMappedEndpoints

public void setMappedEndpoints(Set mappedEndpoints)
Specify the set of endpoints that this exception resolver should map.

The exception mappings and the default fault will only apply to the specified endpoints.

If no endpoints are set, both the exception mappings and the default fault will apply to all handlers. This means that a specified default fault will be used as fallback for all exceptions; any further EndpointExceptionResolvers in the chain will be ignored in this case.


setOrder

public final void setOrder(int order)
Specify the order value for this mapping.

Default value is Integer.MAX_VALUE, meaning that it's non-ordered.

See Also:
Ordered.getOrder()

getOrder

public final int getOrder()
Specified by:
getOrder in interface Ordered

resolveException

public final boolean resolveException(MessageContext messageContext,
                                      Object endpoint,
                                      Exception ex)
Default implementation that checks whether the given endpoint is in the set of mapped endpoints.

Specified by:
resolveException in interface EndpointExceptionResolver
Parameters:
messageContext - current message context
endpoint - the executed endpoint, or null if none chosen at the time of the exception
ex - the exception that got thrown during endpoint execution
Returns:
true if resolved; false otherwise
See Also:
resolveExceptionInternal(MessageContext,Object,Exception)

resolveExceptionInternal

protected abstract boolean resolveExceptionInternal(MessageContext messageContext,
                                                    Object endpoint,
                                                    Exception ex)
Template method for resolving exceptions that is called by resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception).

Parameters:
messageContext - current message context
endpoint - the executed endpoint, or null if none chosen at the time of the exception
ex - the exception that got thrown during endpoint execution
Returns:
true if resolved; false otherwise
See Also:
resolveException(MessageContext,Object,Exception)

Spring Web Services Framework

Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.