public void setAsText(String text) throws IllegalArgumentException {
StringTokenizer tokenizer = new StringTokenizer(text, ",");
if ( !tokenizer.hasMoreElements() ) {
throw new PropertyEditorException("<Name>,<InetAddress>,<Port>");
}
String name = (String) tokenizer.nextElement();
if ( !tokenizer.hasMoreElements() ) {
throw new PropertyEditorException("<Name>,<InetAddress>,<Port>");
}
String addressAsString = (String) tokenizer.nextElement();
InetAddressEditor addressEditor = new InetAddressEditor();
addressEditor.setAsText(addressAsString);
InetAddress address = (InetAddress) addressEditor.getValue();
if ( !tokenizer.hasMoreElements() ) {
throw new PropertyEditorException("<Name>,<InetAddress>,<Port>");
}
String portAsText = (String) tokenizer.nextElement();
int port = Integer.parseInt(portAsText);
nodeInfo = new NodeInfo(name, address, port);