KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > FooImpl


1
2 import org.ozoneDB.OzoneObject;
3
4 /**
5  * @see {Client}
6  * $Id: FooImpl.java,v 1.1 2003/04/17 09:36:08 per_nyfelt Exp $
7  */

8 public class FooImpl extends OzoneObject implements Foo {
9
10     private String JavaDoc aVal;
11     private String JavaDoc bVal;
12
13     public void setA(String JavaDoc aVal) throws Exception JavaDoc {
14         this.aVal = aVal;
15     }
16
17     public String JavaDoc getA() {
18         return aVal;
19     }
20
21     /**
22      *
23      * @param bVal
24      * @throws Exception when the value bad is supplied
25      */

26     public void setB(String JavaDoc bVal) throws Exception JavaDoc {
27         if (bVal.equals("bad")) {
28             throw new Exception JavaDoc("illegal value");
29         }
30         this.bVal = bVal;
31     }
32
33     public String JavaDoc getB() {
34         return bVal;
35     }
36 }
37
Popular Tags