> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Greg
>
> >>>>> "Berin" == Berin Loritsch <[EMAIL PROTECTED]> writes:
>
> Berin> What about merging Contextualizable, Configurable, and
> Berin> Parameterizable?
>
> Berin> i.e.
>
> Berin> interface ConfigurationManager
> Berin> {
> Berin> Logger getLogger(); // can be its own interface...
> Berin> Context getContext();
> Berin> Configuration getConfiguration();
> Berin> Properties getProperties(); // replace the
> proprietary parameters.
> Berin> }
>
> Currently it is very easy to extend AbstractLogEnabled to have logging
> established. Can we achieve the same level of convenience with the new
> approach? The best I could think of was calling
> super.megaconfigure(configurationManager);
> and have that do
> m_logger = configurationManager.getLogger();
>
> This is longer and more error prone.
It's still the first stage. You would have something like this:
class AbstractConfigurable implements Configurable
{
private m_configurationManager = null;
public void configure( ConfigurationManager cm )
{
m_configurationManager = cm;
}
protected Logger getLogger()
{
return m_configurationManager.getLogger();
}
}
Also note, that the Logger (AKA LogEnabled) can remain its own
interface. In this case, we don't deviate a whole lot from the
current Avalon:
interface LogEnabled
{
void enableLogging( Logger logger );
}
interface Configurable
{
void configure( ConfigurationManager cm );
}
interface ConfigurationManager
{
Context getContext();
Configuration getConfiguration();
Properties getProperties();
}
interface Serviceable
{
void service( ServiceManager sm );
}
interface ServiceManager
{
Object lookup( String role ) throws ServiceException;
boolean hasService( String role ) throws ServiceException;
}
interface Initializable
{
void initialize();
}
interface Startable
{
void start();
void stop();
}
interface Suspendable
{
void suspend();
void resume();
}
interface ConfigurationChangeListener
{
void configurationChanged( ConfigurationChangeEvent );
}
interface Disposable
{
void dispose();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>