beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Marvin" <ky...@bea.com>
Subject RE: Extensibility on @ControlExtension vs @ControlImplementation
Date Mon, 30 Aug 2004 13:24:38 GMT
+1, definitely seems like extensibility is an attribute of the control type, not the supporting
implementation.

This being said, I don't like the notion of public interfaces extending the Extensible interface,
because this exposes the invoke() method that gets called when an extension-defined method
is called.  The doesn't belong as part of the public contract for the control type.

It seems like a better answer is to have a marker interface (Extensible) that should be extended
by the public interface to indicate extensibility and a corresponding interface (ExtensibleHandler,
including the invoke() method) that defines the corresponding implementation contract for
an extensible control.

Attempting to bind a control implementation that does not implement ExtensibleHandler with
a control interface (or control extension) that derives from Extensible would be a binding
error.

-- Kyle

> -----Original Message-----
> From: Ken Tam 
> Sent: Monday, August 30, 2004 3:02 AM
> To: Beehive Developers
> Subject: Extensibility on @ControlExtension vs @ControlImplementation
> 
> 
> Looking at the controls examples, it seems that extensibility 
> should be
> a property of the public interface instead of the implementation.  Ie,
> the public interface should extend
> org.apache.beehive.controls.api.bean.Extensible, and the 
> implementation
> should be required to implement Extensible.invoke() because it extends
> the public interface.  Otherwise, one implication is that alternative
> implementations of a control interface could choose to not support
> extensibility; that ought to be a property of the public contract that
> implementors can't choose to retract.  It should then be an error to
> declare an @ControlExtension with an inheritance heirarchy 
> that doesn't
> include an @ControlInterface that extended Extensible.
> 
> 
> 
> 
> 

Mime
View raw message