Interface EndpointMapping

All Known Subinterfaces:
SoapEndpointMapping
All Known Implementing Classes:
AbstractActionEndpointMapping, AbstractActionMethodEndpointMapping, AbstractAddressingEndpointMapping, AbstractAnnotationMethodEndpointMapping, AbstractEndpointMapping, AbstractMapBasedEndpointMapping, AbstractMethodEndpointMapping, AbstractQNameEndpointMapping, AnnotationActionEndpointMapping, DelegatingSoapEndpointMapping, PayloadRootAnnotationMethodEndpointMapping, PayloadRootQNameEndpointMapping, SimpleActionEndpointMapping, SimpleMethodEndpointMapping, SoapActionAnnotationMethodEndpointMapping, SoapActionEndpointMapping, UriEndpointMapping, XmlRootElementEndpointMapping, XPathPayloadEndpointMapping

public interface EndpointMapping
Defines a mapping between message requests and endpoint objects.

This class can be implemented by application developers, although this is not always necessary, as PayloadRootQNameEndpointMapping and SoapActionEndpointMapping are included.

HandlerMapping implementations can support mapped interceptors but do not have to. An endpoint will always be wrapped in a EndpointExecutionChain instance, optionally accompanied by some EndpointInterceptor instances. The MessageDispacher will first call each EndpointInterceptor's handlerRequest method in the given order, finally invoking the endpoint itself if all handlerRequest methods have returned true.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
  • Method Details

    • getEndpoint

      EndpointInvocationChain getEndpoint(MessageContext messageContext) throws Exception
      Returns an endpoint and any interceptors for this message context. The choice may be made on message contents, transport request url, a routing table, or any factor the implementing class chooses.

      The returned EndpointExecutionChain contains an endpoint Object, rather than even a tag interface, so that endpoints are not constrained in any way. For example, a EndpointAdapter could be written to allow another framework's endpoint objects to be used.

      Returns null if no match was found. This is by design. The MessageDispatcher will query all registered EndpointMapping beans to find a match, and only decide there is an error if none can find an endpoint.

      Returns:
      a HandlerExecutionChain instance containing endpoint object and any interceptors, or null if no mapping is found
      Throws:
      Exception - if there is an internal error