Interface HeadersMatcherBuilderStep<BUILDER extends HeadersMatcherBuilderStep<BUILDER>>

All Superinterfaces:
BuilderStep
All Known Subinterfaces:
BidiStreamingMethodStubBuilderStep<ReqT,RespT>, ClientStreamingMethodStubBuilderStep<ReqT,RespT>, RequestPatternBuilderStep<ReqT>, ServerStreamingMethodStubBuilderStep<ReqT,RespT>, UnaryMethodStubBuilderStep<ReqT,RespT>
All Known Implementing Classes:
BidiStreamingMethodStubBuilderImpl, ClientStreamingMethodStubBuilderImpl, HeadersMatcherBuilderImpl, RequestPatternBuilderImpl, ServerStreamingMethodStubBuilderImpl, UnaryMethodStubBuilderImpl

public interface HeadersMatcherBuilderStep<BUILDER extends HeadersMatcherBuilderStep<BUILDER>> extends BuilderStep
Author:
Fadelis
  • Method Summary

    Modifier and Type
    Method
    Description
    default BUILDER
    withHeader(io.grpc.Metadata.Key<byte[]> header, byte[] value)
    Adds a binary header matcher for the stub, which will trigger only if the given header has binary value Arrays.equals(byte[], byte[]) to the provided one.
    default BUILDER
    withHeader(io.grpc.Metadata.Key<String> header, String value)
    Adds a header matcher for the stub, which will trigger only if the given header has value equal to the provided one.
    <T> BUILDER
    withHeader(io.grpc.Metadata.Key<T> headerKey, Predicate<T> predicate)
    Adds a header matcher for the stub, which will trigger only if the given header has value satisfying given Predicate.
    default BUILDER
    withHeader(String header, String value)
    Adds a header matcher for the stub, which will trigger only if the given header has value equal to the provided one.
    default BUILDER
    withHeader(String headerName, Predicate<String> predicate)
    Adds a header matcher for the stub, which will trigger only if the given header has value satisfying given Predicate.
    default <T> BUILDER
    withoutHeader(io.grpc.Metadata.Key<T> headerKey)
    Adds a header matcher for the stub, which will trigger only if the given header does not exist.
    default BUILDER
    Adds a header matcher for the stub, which will trigger only if the given header does not exist.
  • Method Details

    • withHeader

      <T> BUILDER withHeader(@Nonnull io.grpc.Metadata.Key<T> headerKey, @Nonnull Predicate<T> predicate)

      Adds a header matcher for the stub, which will trigger only if the given header has value satisfying given Predicate.

      Subsequent matchers for the same header will replace the old one.

    • withHeader

      default BUILDER withHeader(@Nonnull io.grpc.Metadata.Key<byte[]> header, @Nonnull byte[] value)

      Adds a binary header matcher for the stub, which will trigger only if the given header has binary value Arrays.equals(byte[], byte[]) to the provided one.

      Subsequent headers matchers for the same header will replace the old one.

    • withHeader

      default BUILDER withHeader(@Nonnull io.grpc.Metadata.Key<String> header, @Nonnull String value)

      Adds a header matcher for the stub, which will trigger only if the given header has value equal to the provided one.

      Subsequent headers matchers for the same header will replace the old one.

    • withHeader

      default BUILDER withHeader(@Nonnull String headerName, @Nonnull Predicate<String> predicate)

      Adds a header matcher for the stub, which will trigger only if the given header has value satisfying given Predicate.

      Subsequent matchers for the same header will replace the old one.

    • withHeader

      default BUILDER withHeader(@Nonnull String header, @Nonnull String value)

      Adds a header matcher for the stub, which will trigger only if the given header has value equal to the provided one.

      Subsequent headers matchers for the same header will replace the old one.

    • withoutHeader

      default <T> BUILDER withoutHeader(@Nonnull io.grpc.Metadata.Key<T> headerKey)

      Adds a header matcher for the stub, which will trigger only if the given header does not exist.

      Subsequent headers matchers for the same header will replace the old one.

    • withoutHeader

      default BUILDER withoutHeader(@Nonnull String header)

      Adds a header matcher for the stub, which will trigger only if the given header does not exist.

      Subsequent headers matchers for the same header will replace the old one.