You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Peter Donald <pe...@apache.org> on 2002/01/16 21:33:13 UTC

Re: cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix ApplicationEvent.java ApplicationListener.java

Im glad someone besides me also spells property wrong ;)

applicationStarting should probably have a "throws Exception" after it aswell.

Also you should probably add youself as an authour ;)


On Thu, 17 Jan 2002 00:48, hammant@apache.org wrote:
> hammant     02/01/16 05:48:15
>
>   Added:       src/java/org/apache/avalon/phoenix ApplicationEvent.java
>                         ApplicationListener.java
>   Log:
>   new interfaces to support Application listening.
>   Peter to approve.
>
>   Revision  Changes    Path
>   1.1                 
> jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/ApplicationEvent.
>java
>
>   Index: ApplicationEvent.java
>   ===================================================================
>   /*
>    * Copyright (C) The Apache Software Foundation. All rights reserved.
>    *
>    * This software is published under the terms of the Apache Software
> License * version 1.1, a copy of which has been included  with this
> distribution in * the LICENSE.txt file.
>    */
>   package org.apache.avalon.phoenix;
>
>   import java.util.EventObject;
>   import org.apache.avalon.phoenix.metadata.SarMetaData;
>
>   /**
>    * This is the class that is used to deliver notifications
>    * about Application state changes to the
>    * <code>ApplicationListener</code>s of a Server Application.
>    *
>    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
>    */
>   public final class ApplicationEvent
>       extends EventObject
>   {
>       private final String     m_name;
>       private final SarMetaData  m_sarMetaData;
>
>       /**
>        * Construct the <code>ApplicationEvent</code>.
>        *
>        * @param name the name of app
>        * @param sarMetaData the SarMetaData object for app
>        */
>       public ApplicationEvent( final String name,
>               final SarMetaData sarMetaData )
>       {
>           super( name );
>
>           if( null == name )
>           {
>               throw new NullPointerException( "name proeprty is null" );
>           }
>           if( null == sarMetaData )
>           {
>               throw new NullPointerException( "sarMetaData proeprty is
> null" ); }
>
>           m_name = name;
>           m_sarMetaData = sarMetaData;
>       }
>
>       /**
>        * Retrieve name of app.
>        *
>        * @return the name of app
>        */
>       public String getName()
>       {
>           return m_name;
>       }
>
>       /**
>        * Retrieve the SarMetaData for app.
>        *
>        * @return the SarMetaData for app
>        */
>       public SarMetaData getSarMetaData()
>       {
>           return m_sarMetaData;
>       }
>   }
>
>
>
>   1.1                 
> jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/ApplicationListen
>er.java
>
>   Index: ApplicationListener.java
>   ===================================================================
>
>   /*
>    * Copyright (C) The Apache Software Foundation. All rights reserved.
>    *
>    * This software is published under the terms of the Apache Software
> License * version 1.1, a copy of which has been included  with this
> distribution in * the LICENSE.txt file.
>    */
>   package org.apache.avalon.phoenix;
>
>   /**
>    * Implementations of this interface receive notifications about
>    * changes to the state of Application.
>    * The implementation <em>must</em> have a zero argument
>    * constructor and is instantiated before any other component of the
> Server * Application. To receive notification events, the implementation
> class * should be specified in the <code>assembly.xml</code> descriptor. *
>    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
>    */
>   public interface ApplicationListener extends BlockListener
>   {
>
>       /**
>        * Notification that an application is being started.
>        *
>        * @param event the ApplicationEvent
>        *
>        */
>       void applicationStarting(ApplicationEvent applicationEvent);
>
>       /**
>        * Notification that an application has now started.
>        *
>        *
>        */
>       void applicationStarted();
>
>       /**
>        * Notification that an application is being stopped.
>        *
>        *
>        */
>       void applicationStopping();
>
>       /**
>        * Notification that an application has stopped.
>        *
>        *
>        */
>       void applicationStopped();
>
>       /**
>        * Notification that an application has failed at some moment.
>        * This is for information only as Phoenix will do the right
>        * thing for correct shutdown both before and after this method
>        * is called.  The user of this method should NOT call System.exit()
>        *
>        *
>        * @param causeOfFailure
>        *
>        */
>       void applicationFailure(Exception causeOfFailure);
>   }

-- 
Cheers,

Pete

--------------------------------------------------
 Logic: The art of being wrong with confidence...
--------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix ApplicationEvent.java ApplicationListener.java

Posted by Paul Hammant <Pa...@yahoo.com>.
Peter,

>Im glad someone besides me also spells property wrong ;)
>
>applicationStarting should probably have a "throws Exception" after it aswell.
>
>Also you should probably add youself as an authour ;)
>
Thanks, but its your authorship and thereby I have someone to blame for 
the bad spelling as I copied BlockListener for this :-)

Partial GIGO pattern I guess ;-)

I'll fix all bar the author!

- Paul



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>