KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > examples > MasterService


1 package org.sapia.soto.examples;
2
3 import org.sapia.soto.Service;
4
5
6 /**
7  * @author Yanick Duchesne
8   * <dl>
9  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
10  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
11  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
12  * </dl>
13  */

14 public class MasterService implements Service {
15   private String JavaDoc _msg;
16
17   /**
18    * Constructor for MasterService.
19    */

20   public MasterService() {
21     super();
22   }
23
24   /**
25    * @see org.sapia.soto.Service#init()
26    */

27   public void init() throws Exception JavaDoc {
28     System.out.println("initializing " + getClass());
29   }
30
31   /**
32    * @see org.sapia.soto.Service#start()
33    */

34   public void start() throws Exception JavaDoc {
35     System.out.println("starting " + getClass());
36   }
37
38   /**
39    * @see org.sapia.soto.Service#dispose()
40    */

41   public void dispose() {
42   }
43
44   public void setMessage(String JavaDoc msg) {
45     _msg = msg;
46   }
47
48   public String JavaDoc getMessage() {
49     return _msg;
50   }
51
52   public void doSomething() {
53     System.out.println("This is a message: " + _msg);
54   }
55 }
56
Popular Tags