org.servicemix.jbi.resolver
Interface EndpointResolver

All Known Implementing Classes:
EndpointResolverSupport, ServiceAndEndpointNameResolver

public interface EndpointResolver

A Strategy pattern which can be used to plug in different ServiceEndpoint resolving policies from static relationships to dynamic resolution of the endpoint used based on some policy.

Version:
$Revision: 1.5 $

Method Summary
 ServiceEndpoint[] resolveAvailableEndpoints(ComponentContext context, MessageExchange exchange)
          Resolves all the available endpoints which may not be applicable to a component.
 ServiceEndpoint resolveEndpoint(ComponentContext context, MessageExchange exchange, EndpointFilter filter)
          Resolves the endpoint which should be used for the given message exchange using either a hard coded endpoint or some policy which chooses the endpoint dynamically using some algorithm.
 

Method Detail

resolveEndpoint

public ServiceEndpoint resolveEndpoint(ComponentContext context,
                                       MessageExchange exchange,
                                       EndpointFilter filter)
                                throws JBIException
Resolves the endpoint which should be used for the given message exchange using either a hard coded endpoint or some policy which chooses the endpoint dynamically using some algorithm.

Parameters:
context - is the component context
exchange - the message exchange which the endpoint will be used for which may contain some state to help choose the algorithm.
filter - the filter to be applied to the available endpoints
Returns:
the chosen endpoint or null if no endpoint could be found.
Throws:
JBIException

resolveAvailableEndpoints

public ServiceEndpoint[] resolveAvailableEndpoints(ComponentContext context,
                                                   MessageExchange exchange)
                                            throws JBIException
Resolves all the available endpoints which may not be applicable to a component.

Throws:
JBIException


Copyright © 2005 ServiceMix.. All Rights Reserved.