Client client = _client.getParlorContext().getClient();
log.info("Connecting to localhost.");
client.setServer("localhost", Client.DEFAULT_SERVER_PORTS);
// we want to exit when we logged off or failed to log on
client.addClientObserver(new ClientAdapter() {
@Override
public void clientFailedToLogon (Client c, Exception cause) {
log.info("Client failed to logon: " + cause);
System.exit(0);
}