KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > components > kernel > SarEntry


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.components.kernel;
9
10 import org.apache.avalon.framework.configuration.Configuration;
11 import org.apache.avalon.framework.logger.Logger;
12 import org.apache.avalon.phoenix.interfaces.Application;
13 import org.apache.avalon.phoenix.metadata.SarMetaData;
14 import java.io.File JavaDoc;
15
16 /**
17  * This is the structure describing each server application before it is loaded.
18  *
19  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
20  */

21 final class SarEntry
22 {
23     private SarMetaData m_metaData;
24     private Configuration m_configuration;
25     private ClassLoader JavaDoc m_classLoader;
26     private Application m_application;
27     private Logger m_logger;
28     private File JavaDoc m_workDirectory;
29
30
31     protected SarEntry( final SarMetaData metaData,
32                         final File JavaDoc workDirectory,
33                         final ClassLoader JavaDoc classLoader,
34                         final Logger logger,
35                         final Configuration configuration )
36     {
37         if( null == metaData )
38         {
39             throw new NullPointerException JavaDoc( "metaData" );
40         }
41         if( null == classLoader )
42         {
43             throw new NullPointerException JavaDoc( "classLoader" );
44         }
45         if( null == logger )
46         {
47             throw new NullPointerException JavaDoc( "logger" );
48         }
49         if( null == workDirectory )
50         {
51             throw new NullPointerException JavaDoc( "workDirectory" );
52         }
53
54         m_metaData = metaData;
55         m_classLoader = classLoader;
56         m_logger = logger;
57         m_configuration = configuration;
58         m_workDirectory = workDirectory;
59     }
60
61     public File JavaDoc getWorkDirectory()
62     {
63         return m_workDirectory;
64     }
65
66     public Application getApplication()
67     {
68         return m_application;
69     }
70
71     public void setApplication( final Application application )
72     {
73         m_application = application;
74     }
75
76     public SarMetaData getMetaData()
77     {
78         return m_metaData;
79     }
80
81     public Logger getLogger()
82     {
83         return m_logger;
84     }
85
86     public ClassLoader JavaDoc getClassLoader()
87     {
88         return m_classLoader;
89     }
90
91     public Configuration getConfiguration()
92     {
93         return m_configuration;
94     }
95 }
96
Popular Tags