final ProcessControllerClient client = (ProcessControllerClient) connection.getAttachment();
messageHandler.handleConnectionFinished(client);
}
});
final ProtocolClient client = new ProtocolClient(configuration);
final Connection connection = client.connect();
boolean ok = false;
try {
final OutputStream os = connection.writeMessage();
try {
os.write(Protocol.AUTH);
os.write(1);
os.write(authCode);
final ProcessControllerClient processControllerClient = new ProcessControllerClient(connection);
connection.attach(processControllerClient);
CLIENT_LOGGER.trace("Sent initial greeting message");
os.close();
ok = true;
return processControllerClient;
} finally {