Record Class HandleNothingFilterInvoker
- All Implemented Interfaces:
FilterInvoker
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aHandleNothingFilterInvokerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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) Handle deserialized request data.CompletionStage<io.kroxylicious.proxy.filter.ResponseFilterResult> onResponse(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, org.apache.kafka.common.message.ResponseHeaderData header, org.apache.kafka.common.protocol.ApiMessage body, io.kroxylicious.proxy.filter.FilterContext filterContext) Handle deserialized response data.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.kroxylicious.proxy.internal.filter.FilterInvoker
shouldHandleRequest, shouldHandleResponse
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
HandleNothingFilterInvoker
public HandleNothingFilterInvoker()Creates an instance of aHandleNothingFilterInvokerrecord class.
-
-
Method Details
-
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.
-
onResponse
public CompletionStage<io.kroxylicious.proxy.filter.ResponseFilterResult> onResponse(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, org.apache.kafka.common.message.ResponseHeaderData header, org.apache.kafka.common.protocol.ApiMessage body, io.kroxylicious.proxy.filter.FilterContext filterContext) Description copied from interface:FilterInvokerHandle deserialized response data. Implementations must tolerate being called with responses 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 onResponse called. Implementations should forward responses they do not wish to operate on.
Filters must return a
CompletionStage<io.kroxylicious.proxy.filter.ResponseFilterResult>object. This object encapsulates the response to be forwarded and, optionally, orders for actions such as closing the connection or dropping the response.The
FilterContextis the factory forFilterResultobjects. SeeFilterContext.forwardResponse(ResponseHeaderData, ApiMessage)andFilterContext.responseFilterResultBuilder()for more details.- Specified by:
onResponsein 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.ResponseFilterResult>, that when complete, will yield the response to forward.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
-