Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kasource.kaevent.example.guice.custom;
 
 
 import  com.google.inject.Singleton;
 
//CHECKSTYLE:OFF
///CLOVER:OFF
@Singleton
@BeanListener("thermometer")
public class Cooler implements TemperatureChangeListener {
    private boolean enabled = false;
    
    public Cooler() {
	}
    
	void initialize() {	
	}
    
    public boolean isEnabled() {
        return ;
    }
    @Override
    public void highTemperature(TemperatureChangeEvent event) {
        if (!) {
            ..println("Cooler started.");
        }
         = true;
    }
    @Override
    public void lowTemperature(TemperatureChangeEvent event) {
        if () {
            ..println("Cooler turned off.");
        }
         = false;
    }
    @Override
    public void mediumTemperature(TemperatureChangeEvent event) {
        if () {
            ..println("Cooler turned off.");
        }
         = false;
    }
New to GrepCode? Check out our FAQ X