Re: starting and stopping services?

2014-10-03 Thread Sam Berlin
As mentioned earlier, doing this is as simple as: // In each module that has a service: Multibinder multibinder = Multibinder.newSetBinder(binder(), Service.class); multibinder.addBinding().to(MyService.class); // In one main module: @Provides ServiceManager provideServiceManager(Set services) {

Re: starting and stopping services?

2014-10-03 Thread Martin Grajcar
On Fri, Oct 3, 2014 at 8:26 AM, Kevin Burton wrote: > Hm.. only that won't work... I guess this is due to type erasure? fun! > > com.google.inject.CreationException: Unable to create injector, see the > following errors: > > 1) T cannot be used as a key; It is not fully specified. > If @Provide

graphing binding dependencies

2014-10-03 Thread Kevin Burton
on startup it would be nice to graph the dependencies of a daemon so I can see what the injection looks like. I noticed there was a GraphViz module... But this requires the Linux C binary and I'd like to not have to require packages. IS there a way to render this just with Java to textual repr