Created
June 11, 2014 20:16
-
-
Save Romain-P/400ba2dac690db2dca29 to your computer and use it in GitHub Desktop.
impl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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