1 6 7 package com.quikj.server.framework; 8 9 import org.w3c.dom.*; 11 12 16 public class AceCommandConfigParser 17 { 18 public static final String EL_COMMAND = "command"; 19 public static final String ATT_PORT = "port"; 20 21 private int port = -1; 22 23 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 ex) 33 { 34 throw new AceException ("Port number is not numeric"); 35 } 36 } 37 38 41 public int getPort() 42 { 43 return port; 44 } 45 46 49 public void setPort(int port) 50 { 51 this.port = port; 52 } 53 54 } 55 | Popular Tags |