if (name.equals(A3CML.ELT_DOMAIN)) {
try {
domain = new A3CMLDomain(atts.getValue(A3CML.ATT_NAME),
atts.getValue(A3CML.ATT_NETWORK));
} catch (Exception exc) {
throw new SAXException(exc.getMessage());
}
} else if (name.equals(A3CML.ELT_SERVER)) {
try {
short sid;
try {
sid = Short.parseShort(atts.getValue(A3CML.ATT_ID));
} catch (NumberFormatException exc) {
throw new Exception("bad value for server id: " +
atts.getValue(A3CML.ATT_ID));
}
server = new A3CMLServer(sid,
atts.getValue(A3CML.ATT_NAME),
atts.getValue(A3CML.ATT_HOSTNAME));
} catch (Exception exc) {
throw new SAXException(exc.getMessage());
}
} else if (name.equals(A3CML.ELT_CLUSTER)) {
try {
short sid;
try {
sid = Short.parseShort(atts.getValue(A3CML.ATT_ID));
} catch (NumberFormatException exc) {
throw new Exception("bad value for cluster id: " +
atts.getValue(A3CML.ATT_ID));
}
cluster = new A3CMLCluster(sid,
atts.getValue(A3CML.ATT_NAME));
} catch (Exception exc) {
throw new SAXException(exc.getMessage());
}
} else if (name.equals(A3CML.ELT_NETWORK)) {
try {
int port;
try {
port = Integer.parseInt(atts.getValue(A3CML.ATT_PORT));
} catch (NumberFormatException exc) {
throw new Exception("bad value for network port: " +
atts.getValue(A3CML.ATT_PORT));
}
network = new A3CMLNetwork(atts.getValue(A3CML.ATT_DOMAIN),
port);
} catch (Exception exc) {
throw new SAXException(exc.getMessage());
}
} else if (name.equals(A3CML.ELT_SERVICE)) {
service = new A3CMLService(atts.getValue(A3CML.ATT_CLASS),
atts.getValue(A3CML.ATT_ARGS));
} else if (name.equals(A3CML.ELT_PROPERTY)) {
property = new A3CMLProperty(atts.getValue(A3CML.ATT_NAME),
atts.getValue(A3CML.ATT_VALUE));
} else if (name.equals(A3CML.ELT_NAT)) {
nat = new A3CMLNat(Short.parseShort(atts.getValue(A3CML.ATT_SID)),
atts.getValue(A3CML.ATT_HOSTNAME),
Integer.parseInt(atts.getValue(A3CML.ATT_PORT)));
} else if (name.equals(A3CML.ELT_JVM_ARGS)) {
jvmArgs = atts.getValue(A3CML.ATT_VALUE);
} else {
throw new SAXException("unknown element \"" + name + "\"");
}
}
}