Search in sources :

Example 1 with HandlerInfo

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;
}
Also used : HandlerChain(org.apache.openejb.jee.HandlerChain) HandlerChainInfo(org.apache.openejb.assembler.classic.HandlerChainInfo) ArrayList(java.util.ArrayList) Handler(org.apache.openejb.jee.Handler) ParamValue(org.apache.openejb.jee.ParamValue) HandlerInfo(org.apache.openejb.assembler.classic.HandlerInfo)

Aggregations

ArrayList (java.util.ArrayList)1 HandlerChainInfo (org.apache.openejb.assembler.classic.HandlerChainInfo)1 HandlerInfo (org.apache.openejb.assembler.classic.HandlerInfo)1 Handler (org.apache.openejb.jee.Handler)1 HandlerChain (org.apache.openejb.jee.HandlerChain)1 ParamValue (org.apache.openejb.jee.ParamValue)1