private List<UnifiedHandlerChainMetaData> buildChainMD(ModelNode handlerChainsNode) {
List<UnifiedHandlerChainMetaData> handlerChains = new ArrayList<UnifiedHandlerChainMetaData>();
if (handlerChainsNode.getType() == ModelType.LIST) {
for (ModelNode chainNode : handlerChainsNode.asList()) {
UnifiedHandlerChainMetaData chainMetaData = new UnifiedHandlerChainMetaData();
if (chainNode.hasDefined(Constants.PROTOCOL_BINDING)) {
chainMetaData.setProtocolBindings(chainNode.get(Constants.PROTOCOL_BINDING).asString());
}
if (chainNode.hasDefined(Constants.SERVICE_NAME_PATTERN)) {
chainMetaData.setServiceNamePattern(new QName(chainNode.get(Constants.SERVICE_NAME_PATTERN).asString()));
}
if (chainNode.hasDefined(Constants.PORT_NAME_PATTERN)) {
chainMetaData.setPortNamePattern(new QName(chainNode.get(Constants.PORT_NAME_PATTERN).asString()));
}
if (chainNode.hasDefined(Constants.HANDLER)) {
for (String key : chainNode.get(Constants.HANDLER).keys()) {
UnifiedHandlerMetaData handlerMD = new UnifiedHandlerMetaData();
handlerMD.setHandlerName(key);
handlerMD.setHandlerClass(chainNode.get(Constants.HANDLER).get(key).asString());
chainMetaData.addHandler(handlerMD);
}
}
handlerChains.add(chainMetaData);
}