public static ManagementResponseHeader create(final ManagementProtocolHeader header) { return create(ManagementRequestHeader.class.cast(header)); }
public static ManagementResponseHeader create(final ManagementProtocolHeader header) { return create(ManagementRequestHeader.class.cast(header)); }
public static ManagementResponseHeader create(final ManagementProtocolHeader header) { return create(ManagementRequestHeader.class.cast(header)); }
public static ManagementResponseHeader create(final ManagementRequestHeader header) { return create(header, header.getRequestId()); }
public static ManagementResponseHeader create(final ManagementRequestHeader header) { return create(header, header.getRequestId()); }
public static ManagementResponseHeader create(final ManagementRequestHeader header) { return create(header, header.getRequestId()); }
public static <A> void writeResponse(final ResponseWriter writer, final ManagementRequestContext<A> context) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); writeResponse(writer, context, header); }
public static <A> void writeResponse(final ResponseWriter writer, final ManagementRequestContext<A> context) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); writeResponse(writer, context, header); }
protected FlushableDataOutput writeGenericResponseHeader(final ManagementRequestContext<Void> context) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); return context.writeMessage(header); }
protected FlushableDataOutput writeGenericResponseHeader(final ManagementRequestContext<Void> context) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); return context.writeMessage(header); }
protected FlushableDataOutput writeGenericResponseHeader(final ManagementRequestContext<Void> context) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); return context.writeMessage(header); }
public static <A> void writeResponse(final ResponseWriter writer, final ManagementRequestContext<A> context) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); writeResponse(writer, context, header); }
/** * Write an error response. * * @param channel the channel * @param header the request * @param error the error * @throws IOException */ protected static void writeErrorResponse(final Channel channel, final ManagementRequestHeader header, final Exception error) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header, error); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.close(); } finally { StreamUtils.safeClose(output); } }
protected static void writeResponse(final Channel channel, final ManagementRequestHeader header, final Exception error) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header, error); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.write(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } }
protected static void writeResponse(final Channel channel, final ManagementRequestHeader header, final Exception error) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header, error); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.write(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } }
protected static void writeResponse(final Channel channel, final ManagementRequestHeader header, final Exception error) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header, error); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.write(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } }
protected static void writeResponse(final Channel channel, final ManagementRequestHeader header, final byte param) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.write(param); output.write(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } }
protected static void writeResponse(final Channel channel, final ManagementRequestHeader header, final byte param) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.write(param); output.write(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } }
protected static void writeResponse(final Channel channel, final ManagementRequestHeader header, final byte param) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(header); final MessageOutputStream output = channel.writeMessage(); try { writeHeader(response, output); output.write(param); output.write(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } }
@Override public void handleRequest(final DataInput input, final ActiveOperation.ResultHandler<Void> resultHandler, final ManagementRequestContext<Void> context) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader.create(context.getRequestHeader()); final FlushableDataOutput output = context.writeMessage(response); try { output.write(ManagementProtocol.TYPE_PONG); output.writeLong(connectionId); output.writeByte(ManagementProtocol.RESPONSE_END); output.close(); } finally { StreamUtils.safeClose(output); } resultHandler.done(null); }