org.apache.servicemix.jbi.api
Interface EndpointResolver


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: 426415 $

Method Summary
 javax.jbi.servicedesc.ServiceEndpoint[] resolveAvailableEndpoints(javax.jbi.component.ComponentContext context, javax.jbi.messaging.MessageExchange exchange)
          Resolves all the available endpoints which may not be applicable to a component.
 javax.jbi.servicedesc.ServiceEndpoint resolveEndpoint(javax.jbi.component.ComponentContext context, javax.jbi.messaging.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

javax.jbi.servicedesc.ServiceEndpoint resolveEndpoint(javax.jbi.component.ComponentContext context,
                                                      javax.jbi.messaging.MessageExchange exchange,
                                                      EndpointFilter filter)
                                                      throws javax.jbi.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:
javax.jbi.JBIException

resolveAvailableEndpoints

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

Throws:
javax.jbi.JBIException


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.