Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sisu-users] Accessing a list of components


Hi,

I've got an interface

  public interface ILifecycleListener() {
    void start();
    void shutdown();
  }

which several of my components implement. The idea is to perform resource alloication and deallocation within these methods.

Now, rather than hard coding the component list into a controller, I'd like to query Sisu, something like

  injector.getComponents(ILifecycleListener.class);

Is that possible? Or, do you have a better idea?

Thanks,

Jochen

--
"That's what prayers are ... it's frightened people trying to make friends with the bully!"

Terry Pratchett. The Last Hero


Back to the top