Package com.trendmicro.mist.util

Examples of com.trendmicro.mist.util.Exchange


            if(newGraph.containsKey(src))
                deletedDestList.removeAll(newGraph.get(src));

            Vector<Exchange> routeDestList = routeTable.get(src);
            for(String dest : deletedDestList)
                routeDestList.remove(new Exchange(dest));

            if(routeDestList.size() == 0)
                routeTable.remove(src);
        }
        // Add new rules from the new graph
        for(Entry<String, ArrayList<String>> ent : newGraph.entrySet()) {
            String src = ent.getKey();
            ArrayList<String> newDestList = new ArrayList<String>(newGraph.get(src));
            if(oldGraph.containsKey(src))
                newDestList.removeAll(oldGraph.get(src));

            Vector<Exchange> routeDestList = routeTable.get(src);
            if(routeDestList == null) {
                routeDestList = new Vector<Exchange>();
                routeTable.put(src, routeDestList);
            }
            for(String dest : newDestList) {
                routeDestList.add(new Exchange(dest));
            }
        }
        rwlock.writeLock().unlock();

        // Store the new graph
View Full Code Here


        routeFarm.reset();
        /**
         * Insert a routing rule with foo.out->bar.in,log.in
         */
        Vector<Exchange> destVec = new Vector<Exchange>();
        destVec.add(new Exchange("bar.in"));
        destVec.add(new Exchange("bar.in"));
        routeFarm.getRouteTable().put("foo.out", destVec);

        /**
         * getDestList will return a cloned destList, so they should not be the
         * same object, but their content should be equal
View Full Code Here

TOP

Related Classes of com.trendmicro.mist.util.Exchange

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.