return DomainClientProtocol.ADD_DEPLOYMENT_CONTENT_RESPONSE;
}
@Override
protected void sendRequest(final int protocolVersion, final OutputStream outputStream) throws IOException {
ByteDataOutput output = null;
try {
output = new SimpleByteDataOutput(outputStream);
output.writeByte(DomainClientProtocol.PARAM_DEPLOYMENT_NAME);
output.writeUTF(name);
output.writeByte(DomainClientProtocol.PARAM_DEPLOYMENT_RUNTIME_NAME);
output.writeUTF(runtimeName);
output.writeByte(DomainClientProtocol.PARAM_DEPLOYMENT_CONTENT);
try {
byte[] buffer = new byte[8192];
int read;
while ((read = inputStream.read(buffer)) != -1) {
output.write(buffer, 0, read);
}
} finally {
safeClose(inputStream);
}
output.close();
} finally {
safeClose(output);
}
}