for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
if (!isNoNamespaceAttribute(reader, i)) {
throw unexpectedAttribute(reader, i);
} else {
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case HOST: {
host = value;
break;
}
case PORT: {
port = parsePossibleExpression(value);
if(port.getType() != ModelType.EXPRESSION) {
try {
Integer portNo = Integer.valueOf(value);
if (portNo.intValue() < 1) {
throw MESSAGES.invalidPort(attribute.getLocalName(), value, reader.getLocation());
}
}catch(NumberFormatException e) {
throw MESSAGES.invalidPort(attribute.getLocalName(), value, reader.getLocation());
}
}
break;
}
case SECURITY_REALM: {