public <I> void hear(TypeLiteral<I> type, TypeEncounter<I> encounter) {
encounter.register(new InjectionListener<I>() {
@Override
public void afterInjection(I injectee) {
try {
CrateRestMainAction crateRestMainAction = instanceFuture.get(10, TimeUnit.SECONDS);
crateRestMainAction.registerHandler();
} catch (Exception e) {
logger.error("Could not register CrateRestMainAction handler", e);
}
}
});