KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > container > Entry


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.excalibur.container;
9
10 import org.apache.avalon.framework.component.Component;
11
12 /**
13  * Contains information about a particular instance of contained component.
14  * This would contain name, configuration data, parameters, log entries etc.
15  * Basically instance data.
16 *
17  * @author <a HREF="mailto:peter@apache.org">Peter Donald</a>
18  */

19 public class Entry
20     implements Component
21 {
22     private Info m_info;
23     private Object JavaDoc m_instance;
24     private State m_state;
25     private Locator m_locator;
26
27     public Entry()
28     {
29     }
30
31     /**
32      * Retrieve Info describing instance.
33      *
34      * @return the info
35      */

36     public Info getInfo()
37     {
38         return m_info;
39     }
40
41     /**
42      * Mutator for info property.
43      *
44      * @param info the Info
45      */

46     public void setInfo( final Info info )
47     {
48         m_info = info;
49     }
50
51     /**
52      * Retrieve Locator describing access path for instance.
53      *
54      * @return the locator
55      */

56     public Locator getLocator()
57     {
58         return m_locator;
59     }
60
61     /**
62      * Mutator for locator property.
63      *
64      * @param locator the Locator
65      */

66     public void setLocator( final Locator locator )
67     {
68         m_locator = locator;
69     }
70
71     /**
72      * Retrieve instance of component.
73      *
74      * @return the component instance
75      */

76     public Object JavaDoc getInstance()
77     {
78         return m_instance;
79     }
80
81     /**
82      * Set instance of component.
83      *
84      * @return the component instance
85      */

86     public void setInstance( final Object JavaDoc instance )
87     {
88         m_instance = instance;
89     }
90
91     /**
92      * Retrieve state of a component.
93      *
94      * @return the components state
95      */

96     public State getState()
97     {
98         return m_state;
99     }
100
101     /**
102      * set state of a component.
103      *
104      * @param state the components state
105      */

106     public void setState( final State state )
107     {
108         m_state = state;
109     }
110 }
111
Popular Tags