KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > server > framework > AceCommandConfigParser


1 /*
2  * AceCommandConfigParser.java
3  *
4  * Created on August 23, 2002, 2:52 AM
5  */

6
7 package com.quikj.server.framework;
8
9 // JAXP packages
10
import org.w3c.dom.*;
11
12 /**
13  *
14  * @author amit
15  */

16 public class AceCommandConfigParser
17 {
18     public static final String JavaDoc EL_COMMAND = "command";
19     public static final String JavaDoc ATT_PORT = "port";
20     
21     private int port = -1;
22     
23     /** Creates a new instance of AceCommandConfigParser */
24     public AceCommandConfigParser(Node node)
25     throws AceException
26     {
27         try
28         {
29             port = Integer.parseInt(AceXMLHelper.processXMLElement(node,
30             EL_COMMAND, ATT_PORT));
31         }
32         catch (NumberFormatException JavaDoc ex)
33         {
34             throw new AceException ("Port number is not numeric");
35         }
36     }
37     
38     /** Getter for property port.
39      * @return Value of property port.
40      */

41     public int getPort()
42     {
43         return port;
44     }
45     
46     /** Setter for property port.
47      * @param port New value of property port.
48      */

49     public void setPort(int port)
50     {
51         this.port = port;
52     }
53     
54 }
55
Popular Tags