Example usage for org.springframework.integration.leader.event AbstractLeaderEvent getRole

List of usage examples for org.springframework.integration.leader.event AbstractLeaderEvent getRole

Introduction

In this page you can find the example usage for org.springframework.integration.leader.event AbstractLeaderEvent getRole.

Prototype

public String getRole() 

Source Link

Document

Get the role of the leader.

Usage

From source file:org.springframework.integration.support.SmartLifecycleRoleController.java

@Override
public void onApplicationEvent(AbstractLeaderEvent event) {
    if (event instanceof OnGrantedEvent) {
        startLifecyclesInRole(event.getRole());
    } else if (event instanceof OnRevokedEvent) {
        stopLifecyclesInRole(event.getRole());
    }//from  www.j  a v  a2s .c  o  m
}