final Marshaller marshaller = getMarshaller();
marshaller.start(createByteOutput(outputStream));
marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_STATUS_COUNT);
marshaller.writeInt(statuses.size());
for (Map.Entry<ServerIdentity, ServerStatus> entry : statuses.entrySet()) {
ServerIdentity id = entry.getKey();
marshaller.writeByte(DomainClientProtocol.RETURN_HOST_NAME);
marshaller.writeUTF(id.getHostName());
marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_GROUP_NAME);
marshaller.writeUTF(id.getServerGroupName());
marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_NAME);
marshaller.writeUTF(id.getServerName());
marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_STATUS);
marshaller.writeObject(entry.getValue());
}
marshaller.finish();
}