KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > kernel > Entry


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.kernel;
10
11 import java.util.HashSet JavaDoc;
12 import java.util.Set JavaDoc;
13
14 import org.apache.log4j.Logger;
15 import org.jboss.portal.server.kernel.state.State;
16
17 /**
18  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
19  * @version $Revision: 1.2 $
20  */

21 class Entry implements Context
22 {
23
24    final Logger log;
25    final Kernel kernel;
26    final ServiceID id;
27    final ServiceState machine;
28    final Set JavaDoc depends;
29    final Set JavaDoc dependsOnMe;
30    Implementation implementation;
31
32
33    public Entry(Kernel kernel, ServiceID id)
34    {
35       this.log = Logger.getLogger(Kernel.class.getName() + "." + id.toString());
36       this.kernel = kernel;
37       this.id = id;
38       this.machine = new ServiceState(this);
39       this.depends = new HashSet JavaDoc();
40       this.dependsOnMe = new HashSet JavaDoc();
41       this.implementation = null;
42    }
43
44    public State getState()
45    {
46       return machine.getState();
47    }
48
49    public ServiceID getID()
50    {
51       return id;
52    }
53 }
54
Popular Tags