protected void sendResponse(final OutputStream output) throws IOException {
List<HostUpdateResult<?>> responses = domainController.applyHostUpdates(serverManagerName, updates);
final Marshaller marshaller = getMarshaller();
marshaller.start(createByteOutput(output));
marshaller.writeByte(DomainClientProtocol.RETURN_APPLY_UPDATES_RESULT_COUNT);
marshaller.writeInt(responses.size());
for (HostUpdateResult<?> response : responses) {
marshaller.writeByte(DomainClientProtocol.RETURN_APPLY_HOST_UPDATE);
marshaller.writeObject(response);
}