KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.jboss.portal.server.kernel.state.State;
12 import org.jboss.portal.server.kernel.state.StateChangeEvent;
13 import org.jboss.portal.server.kernel.state.StateMachine;
14
15 /**
16  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
17  * @version $Revision: 1.1.1.1 $
18  */

19 public class ServiceState extends StateMachine
20 {
21
22    final Entry entry;
23
24    public ServiceState(Entry entry)
25    {
26       super(entry.log);
27       this.entry = entry;
28    }
29
30    protected void stateChanged(State oldState, State newState)
31    {
32       StateChangeEvent event = new StateChangeEvent(entry.kernel, oldState, newState, entry.implementation);
33       entry.kernel.fireEvent(event);
34    }
35 }
36
Popular Tags