+1; the Observer/Observable stuff is pre-JavaBeans days .. to do this
just define an interface called
AxisConfigurationChangeListener {
void newServiceAdded (..);
void serviceDeleted (..);
...
}
(or something like that) and have the RSS guys impl that (and register
it thru the mechanism u proposed).
AxisConfiguration will have to have an
"addAxisConfigurationChangeListener" method (and the corresponding
remove method). Just have a vector of listeners and then when something
interesting happens call a method to invoke the proper method of the
listener interface in a loop.
Sanjiva.
On Tue, 2005-07-19 at 05:07 +0530, Eran Chinthaka wrote:
> I prefer to have our own interface for this AxisEvent. See Ajith’s
> comments also.
>
>
>
> Chinthaka
>
>
>
>
> ______________________________________________________________________
> From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 18, 2005 4:32 PM
> To: [email protected]
> Subject: Re: [Axis2] Making AxisConfiguration observable
>
>
>
>
> see my comments below
>
>
>
>
>
> Deepal
>
>
>
>
>
> ----- Original Message -----
>
>
> From: Eran Chinthaka
>
>
> To: [email protected]
>
>
> Sent: Tuesday, July 19, 2005 5:14 AM
>
>
> Subject: RE: [Axis2] Making AxisConfiguration observable
>
>
>
>
>
> +1. See my comments below.
>
>
>
>
>
> Hi all;
>
>
>
> To support some new features with Axis2 without changing the
> core architecture I am thinking of making AxisConfiguration
> Observable. Then if some one wants to provide nice feature
> with he can go ahead and do that good use case is providing
> RSS feeders.
>
>
>
> In order to do this I have to do following
>
> 1. Introduce event called AxisEvent which take
> AxisConfiguration as constructor argument. And the event can
> be used to notify to all the observers.
>
>
>
> -- This AxisEvent should contain the required information, and
> I prefer it to be a bean. Deepal, why did you put the
> AxisConfiguration in the constructor ? If AxisConfiguration is
> the only one who is firing the events, you *may* not need a
> reference to AxisConfiguration within AxisEvent.
>
>
>
> Yup I think I should use some kind of bean rather than using
> AxisConfiguration
>
>
>
>
>
> 2. provide a way to add and register Listeners (Observer) to
> Axis2 by adding following element to axis2.xml.
>
>
>
>
>
> <listener name=”RSS” class =
> “org.apche.axis2.rss.RssObserver”>
>
>
>
> -- I think you must have put an interface for the observer
> class of an event, right ?
>
>
>
> Not the interface I guess , the implemenation class which
> iplment Observer interface.
>
>
>
>
>
> At the deployment time those observers will be loaded and
> initiate.
>
>
>
> n Deepal, did you already implemented this ??
>
>
>
> yup halfly implementd
>
>
>
> Regards,
>
> Chinthaka
>
>
>
> Comments ….
>
>
>
>
>
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
>
>
>
>
>
>
>
>