/**
* Reset or create the client handler chain in the binding.<br>
*/
private void initBindingHandlerChain(boolean clearExistingHandlers)
{
BindingExt binding = (BindingExt)getBindingProvider().getBinding();
PortInfo portInfo = epMetaData.getPortInfo();
if (handlerResolver != null)
{
boolean jbossHandlerResolver = handlerResolver instanceof HandlerResolverImpl;
if (jbossHandlerResolver) // knows about PRE and POST handlers
{
HandlerResolverImpl impl = (HandlerResolverImpl)handlerResolver;
impl.initHandlerChain(epConfigMetaData, HandlerType.PRE, clearExistingHandlers);
impl.initHandlerChain(epConfigMetaData, HandlerType.ENDPOINT, clearExistingHandlers);
impl.initHandlerChain(epConfigMetaData, HandlerType.POST, clearExistingHandlers);
List<Handler> preChain = impl.getHandlerChain(portInfo, HandlerType.PRE);
List<Handler> postChain = impl.getHandlerChain(portInfo, HandlerType.POST);
binding.setHandlerChain(postChain, HandlerType.POST);
binding.setHandlerChain(preChain, HandlerType.PRE);
}
// The regular handler chain
List<Handler> endpointChain = handlerResolver.getHandlerChain(portInfo);
binding.setHandlerChain(endpointChain);
}
}