return ServerManagerProtocol.GET_SERVER_LIST_RESPONSE;
}
@Override
protected void sendResponse(final OutputStream output) throws IOException {
final Marshaller marshaller = getMarshaller();
marshaller.start(createByteOutput(output));
Map<ServerIdentity, ServerStatus> serverStatuses = serverManager.getServerStatuses();
marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_COUNT);
marshaller.writeInt(serverStatuses.size());
for (Map.Entry<ServerIdentity, ServerStatus> entry : serverStatuses.entrySet()) {
marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_NAME);
marshaller.writeUTF(entry.getKey().getServerName());
marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_GROUP_NAME);
marshaller.writeUTF(entry.getKey().getServerGroupName());
marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_STATUS);
marshaller.writeObject(entry.getValue());
}
marshaller.finish();
}