return DomainControllerProtocol.REGISTER_RESPONSE;
}
@Override
protected final void readRequest(final String serverManagerId, final InputStream inputStream) throws IOException {
ByteDataInput input = null;
try {
input = new SimpleByteDataInput(inputStream);
expectHeader(input, DomainControllerProtocol.PARAM_SERVER_MANAGER_HOST);
final int addressSize = input.readInt();
byte[] addressBytes = new byte[addressSize];
input.readFully(addressBytes);
expectHeader(input, DomainControllerProtocol.PARAM_SERVER_MANAGER_PORT);
final int port = input.readInt();
final InetAddress address = InetAddress.getByAddress(addressBytes);
final ServerManagerClient client = new RemoteDomainControllerClient(serverManagerId, address, port, executorService, threadFactory);
domainController.addClient(client);
log.infof("Server manager registered [%s]", client);
} finally {