Created
June 8, 2014 20:26
-
-
Save Romain-P/fbe4f54d011c66ad1fb3 to your computer and use it in GitHub Desktop.
no comment
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.test.service; | |
| import com.google.inject.AbstractModule; | |
| import com.google.inject.Inject; | |
| import org.heater.api.HeaterActivator; | |
| public class Activator implements HeaterActivator { | |
| @Inject TestImpl test; | |
| @Override | |
| public void start() { | |
| test.test(); //do something :) | |
| } | |
| @Override | |
| public void stop() { | |
| } | |
| @Override | |
| public AbstractModule pluginModule() { | |
| return new AbstractModule() { | |
| @Override | |
| protected void configure() { | |
| bind(TestService.class).to(TestImpl.class).asEagerSingleton(); | |
| } | |
| }; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment