// this method will be used for JAXRS client
public void initialize(InterceptorProvider interceptorProvider, Bus bus) {
// try to find if the InterceptorProvider is a ConduitSelectorHolder
if (interceptorProvider instanceof ConduitSelectorHolder) {
ConduitSelectorHolder holder = (ConduitSelectorHolder) interceptorProvider;
// get the endpoint of the original ConduitSelector
ConduitSelector oldSelector = holder.getConduitSelector();
LoadBalanceTargetSelector selector = getDefaultLoadBalanceTargetSelector();
selector.setEndpoint(oldSelector.getEndpoint());
try {
selector.setLoadBalanceStrategy(getLoadBalanceStrategy());
holder.setConduitSelector(selector);
} catch (Exception e) {
LOG.error("Cannot setup the LoadBalanceStrategy due to " + e);
}
// setup the BusLifeCycleListener
BusLifeCycleManager manager = bus.getExtension(BusLifeCycleManager.class);