Skip to content

Instantly share code, notes, and snippets.

@Romain-P
Created June 11, 2014 20:16
Show Gist options
  • Select an option

  • Save Romain-P/400ba2dac690db2dca29 to your computer and use it in GitHub Desktop.

Select an option

Save Romain-P/400ba2dac690db2dca29 to your computer and use it in GitHub Desktop.
impl
package org.heater.plugin;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import com.google.inject.Module;
import net.xeoh.plugins.base.annotations.PluginImplementation;
import org.heater.api.HeaterActivator;
@PluginImplementation
public class Activator implements HeaterActivator{
@Inject Test test;
@Override
public void start() {
test.print();
}
@Override
public void stop() {
test.print();
}
@Override
public Module pluginModule() {
return new AbstractModule() {
@Override
protected void configure() {
bind(Test.class).asEagerSingleton();
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment