KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > ApplicationEvent


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix;
9
10 import java.util.EventObject JavaDoc;
11 import org.apache.avalon.phoenix.metadata.SarMetaData;
12
13 /**
14  * This is the class that is used to deliver notifications
15  * about Application state changes to the
16  * <code>ApplicationListener</code>s of a Server Application.
17  *
18  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
19  */

20 public final class ApplicationEvent
21     extends EventObject JavaDoc
22 {
23     private final String JavaDoc m_name;
24
25     private final SarMetaData m_sarMetaData;
26
27     /**
28      * Construct the <code>ApplicationEvent</code>.
29      *
30      * @param name the name of app
31      * @param sarMetaData the SarMetaData object for app
32      */

33     public ApplicationEvent( final String JavaDoc name,
34                              final SarMetaData sarMetaData )
35     {
36         super( name );
37
38         if( null == name )
39         {
40             throw new NullPointerException JavaDoc( "name" );
41         }
42         if( null == sarMetaData )
43         {
44             throw new NullPointerException JavaDoc( "sarMetaData" );
45         }
46
47         m_name = name;
48         m_sarMetaData = sarMetaData;
49     }
50
51     /**
52      * Retrieve name of app.
53      *
54      * @return the name of app
55      */

56     public String JavaDoc getName()
57     {
58         return m_name;
59     }
60
61     /**
62      * Retrieve the SarMetaData for app.
63      *
64      * @return the SarMetaData for app
65      */

66     public SarMetaData getSarMetaData()
67     {
68         return m_sarMetaData;
69     }
70 }
71
Popular Tags