avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@osm.net>
Subject RE: BlockListener needs more methods
Date Tue, 15 Jan 2002 14:09:41 GMT


> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Tuesday, 15 January, 2002 11:37
> To: Avalon Developers List
> Subject: Re: BlockListener needs more methods
>
>
> On Tue, 15 Jan 2002 20:46, Paul Hammant wrote:
> > >The application startup method would accept a ApplicationEvent object
> > > (that had a method to return the SarMetaData).
> > >
> > >The applicationFailed() method (or whatever it was called) would then
> > > accept an exception and that would be the cause of
> application failure.
> > >
> > >Other events would have 0 parrameters.
> >
> > ApplicationEvent
> > {
> >   SarMetaData getSarMetaData();
> > }
> >
> > BlockListener
> > {
> > // as before plus ....
> >   void applicationStarting();
>
> lets make this one capable of throwing an exception - maybe
> ApplicationUnavailableException or
> UnavailableApplicationException or maybe
> even a vanilla Exception.

+1
java.lang.Exception seems most appropriate to me.

> >   void applicationStarted(ApplicationEvent applicationEvent);
> >   void applicationStopping();
> >   void applicationStopped();
> >   void applicationFailure(Exception causeOfFailure);
> > }
> >
> > Question, should these new methods go in an interface called
> > ApplicationListener that extends BlockListener or not?
>
> not sure - that was something I was going to try out. I wanted to
> because I really really don't want to break backwards compatability prior
> to going beta however I am not sure if it is a good idea.

I don't see any benefit.  If I want a listener just to listen to
application rising then all I need is an ApplicationListener.  If
my application listener is also a block listener (option) then I would
implement both interfaces.  I presuming here that the application
listener laucher would check an application listener for implementation
of the block listener interface a auto-register the app listener as a
block listener.

Steve.

> Not sure what do you think?
>
> --
> Cheers,
>
> Pete
>
> "The perfect way is only difficult for those who pick and choose.  Do not
> like, do not dislike; all will then be clear.  Make a hairbreadth
> difference and heaven and earth are set apart; if you want the truth to
> stand clear before you, never be for or against." - Bruce Lee
>
>
> --
> To unsubscribe, e-mail:
<mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message