use of org.apache.openejb.assembler.classic.HandlerInfo in project tomee by apache.
the class ConfigurationFactory method toHandlerChainInfo.
public static List<HandlerChainInfo> toHandlerChainInfo(final HandlerChains chains) {
final List<HandlerChainInfo> handlerChains = new ArrayList<HandlerChainInfo>();
if (chains == null) {
return handlerChains;
}
for (final HandlerChain handlerChain : chains.getHandlerChain()) {
final HandlerChainInfo handlerChainInfo = new HandlerChainInfo();
handlerChainInfo.serviceNamePattern = handlerChain.getServiceNamePattern();
handlerChainInfo.portNamePattern = handlerChain.getPortNamePattern();
handlerChainInfo.protocolBindings.addAll(handlerChain.getProtocolBindings());
for (final Handler handler : handlerChain.getHandler()) {
final HandlerInfo handlerInfo = new HandlerInfo();
handlerInfo.handlerName = handler.getHandlerName();
handlerInfo.handlerClass = handler.getHandlerClass();
handlerInfo.soapHeaders.addAll(handler.getSoapHeader());
handlerInfo.soapRoles.addAll(handler.getSoapRole());
for (final ParamValue param : handler.getInitParam()) {
handlerInfo.initParams.setProperty(param.getParamName(), param.getParamValue());
}
handlerChainInfo.handlers.add(handlerInfo);
}
handlerChains.add(handlerChainInfo);
}
return handlerChains;
}
Aggregations