Class GetTelemetrySubscriptionsRequestFilterInvoker
- All Implemented Interfaces:
FilterInvoker
-
Constructor Summary
ConstructorsConstructorDescriptionGetTelemetrySubscriptionsRequestFilterInvoker(io.kroxylicious.proxy.filter.GetTelemetrySubscriptionsRequestFilter filter) -
Method Summary
Modifier and TypeMethodDescriptionCompletionStage<io.kroxylicious.proxy.filter.RequestFilterResult> onRequest(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, org.apache.kafka.common.message.RequestHeaderData header, org.apache.kafka.common.protocol.ApiMessage body, io.kroxylicious.proxy.filter.FilterContext filterContext) Handle deserialized request data.booleanshouldHandleRequest(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion) Should this Invoker handle a request with a given api key and api version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.kroxylicious.proxy.internal.filter.FilterInvoker
onResponse, shouldHandleResponse
-
Constructor Details
-
GetTelemetrySubscriptionsRequestFilterInvoker
public GetTelemetrySubscriptionsRequestFilterInvoker(io.kroxylicious.proxy.filter.GetTelemetrySubscriptionsRequestFilter filter)
-
-
Method Details
-
shouldHandleRequest
public boolean shouldHandleRequest(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion) Description copied from interface:FilterInvokerShould this Invoker handle a request with a given api key and api version. Returning true implies that this request will be deserialized andFilterInvoker.onRequest(ApiKeys, short, RequestHeaderData, ApiMessage, FilterContext)is eligible to be called with the deserialized data (if the message flows to that filter).- Specified by:
shouldHandleRequestin interfaceFilterInvoker- Parameters:
apiKey- the key of the messageapiVersion- the version of the message- Returns:
- true if the message should be deserialized
-
onRequest
public CompletionStage<io.kroxylicious.proxy.filter.RequestFilterResult> onRequest(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, org.apache.kafka.common.message.RequestHeaderData header, org.apache.kafka.common.protocol.ApiMessage body, io.kroxylicious.proxy.filter.FilterContext filterContext) Description copied from interface:FilterInvokerHandle deserialized request data. Implementations must tolerate being called with requests that this FilterInvoker is NOT interested in handling. If any FilterInvoker in the chain should handle a response, then all invokers in the chain are eligible to have their onRequest called. Implementations should forward requests they do not wish to operate on.
Filters must return a
CompletionStage<io.kroxylicious.proxy.filter.RequestFilterResult>object. This object encapsulates the request to be forwarded and, optionally, orders for actions such as closing the connection or dropping the request.The
FilterContextis the factory forFilterResultobjects. SeeFilterContext.forwardRequest(RequestHeaderData, ApiMessage)andFilterContext.requestFilterResultBuilder()for more details.- Specified by:
onRequestin interfaceFilterInvoker- Parameters:
apiKey- the key of the messageapiVersion- the apiVersion of the messageheader- the header of the messagebody- the body of the messagefilterContext- contains methods to continue the filter chain and other contextual data- Returns:
- a
CompletionStage<io.kroxylicious.proxy.filter.RequestFilterResult>, that when complete, will yield the request to forward.
-