This is what ProvisionListener is for.

On Friday, 21 October 2016 18:38:11 UTC-4, Kevin Burton wrote:
>
> I'm trying to figure out if this is possible but I think I'm looking in 
> the wrong places.
>
> I want to add some syntactic sugar to Guice so that we have AutoService 
> interfaces on our objects that have start / stop methods.
>
> This way I can create a normal Guice binding, create my injector, and then 
> I can have my 'app' call start() in one place which starts all the services.
>
> This way I can have a basic injector to just test bindings, then in 
> production start() my app which will connect to databases, open large 
> files, etc.
>
> The problem I'm having is I need a handle on every instance of a new 
> object guice creeates.
>
> I thought I could do this via BindListener but I only get the class, not 
> that actual instance that was created.
>
> I'm sure I'm just looking in the wrong place so some advice would be super 
> helpful... 
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/86fd7da4-c880-4c69-9d61-6dc8e5f6f946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to