Package org.apache.stratos.messaging.event.topology

Examples of org.apache.stratos.messaging.event.topology.CompleteTopologyEvent


    public boolean process(String type, String message, Object object) {
        Topology topology = (Topology) object;

        if (CompleteTopologyEvent.class.getName().equals(type)) {
          // Parse complete message and build event
          CompleteTopologyEvent event = (CompleteTopologyEvent) Util.jsonToObject(message, CompleteTopologyEvent.class);
         
            // if topology has not already initialized
      if (!topology.isInitialized()) {

        // Apply service filter
        if (TopologyServiceFilter.getInstance().isActive()) {
          // Add services included in service filter
          for (Service service : event.getTopology().getServices()) {
            if (TopologyServiceFilter.getInstance()
                .serviceNameIncluded(service.getServiceName())) {
              topology.addService(service);
            } else {
              if (log.isDebugEnabled()) {
                log.debug(String.format(
                    "Service is excluded: [service] %s",
                    service.getServiceName()));
              }
            }
          }
        } else {
          // Add all services
          topology.addServices(event.getTopology().getServices());
        }

        // Apply cluster filter
        if (TopologyClusterFilter.getInstance().isActive()) {
          for (Service service : topology.getServices()) {
View Full Code Here

TOP

Related Classes of org.apache.stratos.messaging.event.topology.CompleteTopologyEvent

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.