Class TransformRequestContext

java.lang.Object
org.apache.kafka.common.requests.RequestContext
org.apache.kafka.common.requests.TransformRequestContext
All Implemented Interfaces:
org.apache.kafka.server.authorizer.AuthorizableRequestContext

public class TransformRequestContext extends org.apache.kafka.common.requests.RequestContext
Same with RequestContext but allows passing in a custom response transforming function.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.kafka.common.requests.RequestContext

    org.apache.kafka.common.requests.RequestContext.ResponseSend
  • Field Summary

    Fields inherited from class org.apache.kafka.common.requests.RequestContext

    authenticationContext, clientAddress, clientInformation, clientPort, confluentMetricsContextProvider, connectionId, fromPrivilegedListener, header, k2RequestContext, listenerName, principal, principalSerde, produceConsumeAuditLogTracker, securityProtocol, shouldLogForConnection, sniHostName
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransformRequestContext(org.apache.kafka.common.requests.RequestHeader header, String connectionId, InetAddress clientAddress, org.apache.kafka.common.security.auth.KafkaPrincipal principal, org.apache.kafka.common.network.ListenerName listenerName, org.apache.kafka.common.security.auth.SecurityProtocol securityProtocol, org.apache.kafka.common.network.ClientInformation clientInformation, org.apache.kafka.common.security.authenticator.PathAwareSniHostName sniHostName, boolean fromPrivilegedListener)
     
    TransformRequestContext(org.apache.kafka.common.requests.RequestHeader header, String connectionId, InetAddress clientAddress, org.apache.kafka.common.security.auth.KafkaPrincipal principal, org.apache.kafka.common.network.ListenerName listenerName, org.apache.kafka.common.security.auth.SecurityProtocol securityProtocol, org.apache.kafka.common.network.ClientInformation clientInformation, org.apache.kafka.common.security.authenticator.PathAwareSniHostName sniHostName, boolean fromPrivilegedListener, Function<? super org.apache.kafka.common.requests.AbstractResponse, ? extends org.apache.kafka.common.requests.AbstractResponse> responseTransformer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.kafka.common.requests.RequestContext.ResponseSend
    buildResponseSend(org.apache.kafka.common.requests.AbstractResponse body)
     

    Methods inherited from class org.apache.kafka.common.requests.RequestContext

    allBrokerZones, apiKey, apiVersion, brokerToGatewayZoneMapping, buildResponseEnvelopePayload, clientAddress, clientId, connectionId, controllerRequestPrincipal, correlationId, fqdnPropertiesFromPpv2, getClientAddress, getPrincipal, getPrincipalSerde, intercept, isPpv2EndpointSchemeEnabled, isPpv2EndpointSchemeMapBrokerToGatewayZoneEnabled, isProxyModeLocal, kafkaRequestId, listenerName, maybeEnableClusterLinkTenant, parsedResponse, parseRequest, parseRequest, principal, quotaPrincipal, requestType, requestVersion, securityProtocol, sessionId, setAllBrokerZones, setBrokerToGatewayZoneMapping, setTenantConfig, shouldIntercept, sniHostName, tenantConfig, tenantPrefix, toString, transformed

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.kafka.server.authorizer.AuthorizableRequestContext

    clientAddressAsString
  • Constructor Details

    • TransformRequestContext

      public TransformRequestContext(org.apache.kafka.common.requests.RequestHeader header, String connectionId, InetAddress clientAddress, org.apache.kafka.common.security.auth.KafkaPrincipal principal, org.apache.kafka.common.network.ListenerName listenerName, org.apache.kafka.common.security.auth.SecurityProtocol securityProtocol, org.apache.kafka.common.network.ClientInformation clientInformation, org.apache.kafka.common.security.authenticator.PathAwareSniHostName sniHostName, boolean fromPrivilegedListener)
    • TransformRequestContext

      public TransformRequestContext(org.apache.kafka.common.requests.RequestHeader header, String connectionId, InetAddress clientAddress, org.apache.kafka.common.security.auth.KafkaPrincipal principal, org.apache.kafka.common.network.ListenerName listenerName, org.apache.kafka.common.security.auth.SecurityProtocol securityProtocol, org.apache.kafka.common.network.ClientInformation clientInformation, org.apache.kafka.common.security.authenticator.PathAwareSniHostName sniHostName, boolean fromPrivilegedListener, Function<? super org.apache.kafka.common.requests.AbstractResponse, ? extends org.apache.kafka.common.requests.AbstractResponse> responseTransformer)
  • Method Details

    • buildResponseSend

      public org.apache.kafka.common.requests.RequestContext.ResponseSend buildResponseSend(org.apache.kafka.common.requests.AbstractResponse body)
      Overrides:
      buildResponseSend in class org.apache.kafka.common.requests.RequestContext