com.sitewhere.spring.handler.InboundProcessingChainParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sitewhere-spring Show documentation
Show all versions of sitewhere-spring Show documentation
SiteWhere Spring Extensions
/*
* Copyright (c) SiteWhere, LLC. All rights reserved. http://www.sitewhere.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package com.sitewhere.spring.handler;
import java.util.List;
import org.springframework.beans.factory.config.RuntimeBeanReference;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.ManagedList;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import com.sitewhere.device.event.processor.DefaultEventStorageProcessor;
import com.sitewhere.device.event.processor.DefaultInboundEventProcessorChain;
import com.sitewhere.device.event.processor.DeviceStreamProcessor;
import com.sitewhere.device.event.processor.RegistrationProcessor;
import com.sitewhere.hazelcast.HazelcastQueueSender;
/**
* Parses configuration data from SiteWhere inbound processing chain section.
*
* @author Derek
*/
public class InboundProcessingChainParser {
/**
* Parse elements for the inbound processing chain.
*
* @param element
* @param context
* @return
*/
protected Object parse(Element element, ParserContext context) {
BeanDefinitionBuilder chain =
BeanDefinitionBuilder.rootBeanDefinition(DefaultInboundEventProcessorChain.class);
List dsChildren = DomUtils.getChildElements(element);
List