Re: Injection of context in a @Provides method ?

2014-03-12 Thread Dirk Olmes
On 03/10/2014 09:27 PM, Nate Bauernfeind wrote: No actually you don't get already bound exceptions. Guice actually treats the injection as a setter based injection (it doesn't care how you name methods; but I tend to use the word register since it seems to suggest

Re: Injection of context in a @Provides method ?

2014-03-12 Thread Nate Bauernfeind
I agree. If these objects weren't meant to exist throughout the life of my application then binding them as singletons is not a good idea. Additionally, you wouldn't want the listener subscription to last forever either. I instead move subscribe and unsubscribe into start and stop methods. In