public static void reject(
            ChannelHandlerContext ctx,
            RejectionType rejectionType,
            StatusCategory nfStatus,
            String reason,
            HttpRequest request,
            @Nullable Integer injectedLatencyMillis,
            HttpResponseStatus rejectedCode,
            String rejectedBody,
            Map<String, String> rejectionHeaders) {
        switch (rejectionType) {
            case REJECT:
                sendRejectionResponse(
                        ctx,
                        nfStatus,
                        reason,
                        request,
                        injectedLatencyMillis,
                        rejectedCode,
                        rejectedBody,
                        rejectionHeaders);
                return;
            case CLOSE:
                rejectByClosingConnection(ctx, nfStatus, reason, request, injectedLatencyMillis);
                return;
            case ALLOW_THEN_CLOSE:
                allowThenClose(ctx);
                return;
        }
        throw new AssertionError("Bad rejection type: " + rejectionType);
    }
Switches on the rejection type to decide how to reject the request and or close the conn.

@param ctx                   the channel handler processing the request
@param rejectionType         the type of rejection
@param nfStatus              the status to use for metric reporting
@param reason                the reason for rejecting the request.  This is not sent back to the client.
@param request               the request that is being rejected.
@param injectedLatencyMillis optional parameter to delay sending a response. The reject notification is still
                             sent up the pipeline.
@param rejectedCode          the HTTP code to send back to the client.
@param rejectedBody          the HTTP body to be sent back.  It is assumed to be of type text/plain.
@param rejectionHeaders      additional HTTP headers to add to the rejection response
zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java