I'll post that as a separate thread to make it easier to find later.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Aug 9, 2012, at 2:08 PM, Dmitry Gusev wrote:
> Hello, Norman!
>
> Sure, I'd like to see your approach.
>
> On Thu, Aug 9, 2012 at 10:02 PM, Norman Franke
Hello, Robert!
This looks like what I need!
Now I can remove bind() calls and just do:
@Contribute(WorkerManager.class)
public static void defineWorkers(Configuration conf) {
conf.addInstance(GitPullWorker.class);
conf.addInstance(GitCloneWorker.class);
}
And I e
Hello, Norman!
Sure, I'd like to see your approach.
On Thu, Aug 9, 2012 at 10:02 PM, Norman Franke wrote:
> If all the workers are in the same package you could make/Google a
> PackageEnumerator class that uses a ClassLoader to get all of the classes
> in the package, and then register those. I
Hi Dimitry.
What you need is to contribute your workers to the worker manager. Something
like:
contributeWorkerManager(Configuration conf) {
conf.add(...)
conf.add(...)
}
Now, the useful thing about this is that any module that is used in your app
that has a "contributeWorkerManager" will
If all the workers are in the same package you could make/Google a
PackageEnumerator class that uses a ClassLoader to get all of the classes in
the package, and then register those. I do this with my DAOs interface and
implementations to keep me from having to remember to add them to the AppModu
Yes, thanks for correction. But you get the idea?
How can I fix the signature to get all the implementations?
On Thu, Aug 9, 2012 at 9:52 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:
> On Thu, 09 Aug 2012 14:38:25 -0300, Dmitry Gusev
> wrote:
>
> Hi,
>>
>
> Hi!
>
>
> But I'd
On Thu, 09 Aug 2012 14:38:25 -0300, Dmitry Gusev
wrote:
Hi,
Hi!
But I'd like to inject them all at once like this:
public static WorkerManager buildWorkerManager(Collection
workers) {
This isn't dependency injection, it's receiving distributed configuration,
hence the empty colle