Package org.apache.stratos.messaging.event.instance.notifier

Examples of org.apache.stratos.messaging.event.instance.notifier.InstanceCleanupClusterEvent


    @Override
    public boolean process(String type, String message, Object object) {
        if (InstanceCleanupClusterEvent.class.getName().equals(type)) {
            // Parse complete message and build event
            InstanceCleanupClusterEvent event = (InstanceCleanupClusterEvent) Util.jsonToObject(message, InstanceCleanupClusterEvent.class);

            // Notify event listeners
            notifyEventListeners(event);
            return true;
        }
View Full Code Here


        eventReceiver.addEventListener(new InstanceCleanupClusterEventListener() {
            @Override
            protected void onEvent(Event event) {
                String clusterIdInPayload = CartridgeAgentConfiguration.getInstance().getClusterId();
                InstanceCleanupClusterEvent instanceCleanupClusterEvent = (InstanceCleanupClusterEvent) event;
                if (clusterIdInPayload.equals(instanceCleanupClusterEvent.getClusterId())) {
                    onInstanceCleanupEvent();
                }
            }
        });
        Thread eventReceiverThread = new Thread(eventReceiver);
View Full Code Here

        publish(new InstanceCleanupMemberEvent(memberId));
    }

    public void sendInstanceCleanupEventForCluster(String clusterId) {
         log.info(String.format("Publishing Instance Cleanup Event: [cluster] %s", clusterId));
        publish(new InstanceCleanupClusterEvent(clusterId));
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.messaging.event.instance.notifier.InstanceCleanupClusterEvent

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.