Package org.xmatthew.spy2servers.rule

Examples of org.xmatthew.spy2servers.rule.Channel


    return channels;
  }
 
  @SuppressWarnings("unchecked")
    protected Channel parseChannel(Element element) {
    Channel channel = new Channel();

    Set from = new HashSet();
    Set to = new HashSet();
   
    NodeList childNodes = element.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
      Node child = childNodes.item(i);
      if (child.getNodeType() == Node.ELEMENT_NODE) {
        String localName = child.getLocalName();
        if (FROM_ELEMENT.equals(localName)) {
          String ref = ((Element) child).getAttribute("value");
          from.add(ref);
        } else if (TO_ELEMENT.equals(localName)) {
          String ref = ((Element) child).getAttribute("value");
          to.add(ref);
        }
      }
    }   
    channel.setFrom(from);
    channel.setTo(to);
    return channel;
  }
View Full Code Here

TOP

Related Classes of org.xmatthew.spy2servers.rule.Channel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.