/** * Build a {@link Send} response on {@link #authenticate()} failure. The actual response is sent out when * {@link #sendAuthenticationFailureResponse()} is called. */ private void buildResponseOnAuthenticateFailure(RequestContext context, AbstractResponse response) { authenticationFailureSend = context.buildResponse(response); }
private void sendKafkaResponse(RequestContext context, AbstractResponse response) throws IOException { sendKafkaResponse(context.buildResponse(response)); }
assertTrue(request.hasUnsupportedRequestVersion()); Send send = context.buildResponse(new ApiVersionsResponse(0, Errors.UNSUPPORTED_VERSION, Collections.<ApiVersionsResponse.ApiVersion>emptyList())); ByteBufferChannel channel = new ByteBufferChannel(256);