01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.com
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package org.huihoo.jfox.service;
09:
10: /**
11: *
12: * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
13: */
14:
15: public interface Component extends Loggable, Persistentable {
16: /**
17: * get the name of the Service, example: NamingService
18: */
19: String getName();
20:
21: /**
22: * get the state of the Service, the status defined in Status class
23: */
24: State getState();
25:
26: /**
27: * doCreate the service, do expensive operations etc
28: */
29: void init() throws Exception;
30:
31: /**
32: * doDestroy the service, tear down
33: */
34: void destroy() throws Exception;
35:
36: }
|