I am about to do some more work on Jesktop (given there is more competition 
currently).  Nicola
Ken suggested that Jesktop could benefit from general services and I am inclided to do 
that, but
maybe there is a case for a hot-puggable system like Jesktop to have a Lifecycleable 
api.  As this
possibly applies to Avalon in genral. As such, I'd like to propose it here :

interface Lifecycleable {
  // int getStage(); // maybe ?
  String getLifecycleInterface();
  void startupLifecycle(Object obj);
  void shutdownLifecycle(Object obj);
}

DefaultLogEnabledLifecyclable extends AbstractLogEnabled implemnents Lifecyclable{

  public String getLifecycleInterface() {
    retrurn "org.apache.avalon.framework.LogEnabled";
  }
  public void startupLifecycle(Object obj) {
    ((LogEnabled) obj).enableLogging(getLogger());
  }
  public void shutdownLifecycle(Object obj) {
    ((LogEnabled) obj).enableLogging(null);  //maybe
  }
}

And similar for Iniializable, Startable, Dooable, Blahable...

Thoughts?

- Paul

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to