Class GrpcServiceDescriptor.BuilderBase<BUILDER extends GrpcServiceDescriptor.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcServiceDescriptor>

java.lang.Object
io.helidon.webclient.grpc.GrpcServiceDescriptor.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
GrpcServiceDescriptor.Builder
Enclosing interface:
GrpcServiceDescriptor

public abstract static class GrpcServiceDescriptor.BuilderBase<BUILDER extends GrpcServiceDescriptor.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcServiceDescriptor> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for GrpcServiceDescriptor.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(GrpcServiceDescriptor prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(GrpcServiceDescriptor.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • serviceName

      public BUILDER serviceName(String serviceName)
      Service name.
      Parameters:
      serviceName - the server name
      Returns:
      updated builder instance
      See Also:
    • methods

      public BUILDER methods(Map<? extends String,? extends GrpcClientMethodDescriptor> methods)
      This method replaces all values with the new ones.
      Parameters:
      methods - method map
      Returns:
      updated builder instance
      See Also:
    • addMethods

      public BUILDER addMethods(Map<? extends String,? extends GrpcClientMethodDescriptor> methods)
      This method keeps existing values, then puts all new values into the map.
      Parameters:
      methods - method map
      Returns:
      updated builder instance
      See Also:
    • putMethod

      public BUILDER putMethod(String key, GrpcClientMethodDescriptor method)
      This method adds a new value to the map, or replaces it if the key already exists.
      Parameters:
      key - key to add or replace
      method - new value for the key
      Returns:
      updated builder instance
      See Also:
    • interceptors

      public BUILDER interceptors(List<? extends io.grpc.ClientInterceptor> interceptors)
      Ordered list of method interceptors.
      Parameters:
      interceptors - list of interceptors
      Returns:
      updated builder instance
      See Also:
    • addInterceptors

      public BUILDER addInterceptors(List<? extends io.grpc.ClientInterceptor> interceptors)
      Ordered list of method interceptors.
      Parameters:
      interceptors - list of interceptors
      Returns:
      updated builder instance
      See Also:
    • addInterceptor

      public BUILDER addInterceptor(io.grpc.ClientInterceptor interceptor)
      Ordered list of method interceptors.
      Parameters:
      interceptor - list of interceptors
      Returns:
      updated builder instance
      See Also:
    • clearCallCredentials

      public BUILDER clearCallCredentials()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • callCredentials

      public BUILDER callCredentials(io.grpc.CallCredentials callCredentials)
      Credentials for this call, if any.
      Parameters:
      callCredentials - optional credentials
      Returns:
      updated builder instance
      See Also:
    • serviceName

      public Optional<String> serviceName()
      Service name.
      Returns:
      the service name
    • methods

      Map of names to gRPC method descriptors.
      Returns:
      the methods
    • interceptors

      public List<io.grpc.ClientInterceptor> interceptors()
      Ordered list of method interceptors.
      Returns:
      the interceptors
    • callCredentials

      public Optional<io.grpc.CallCredentials> callCredentials()
      Credentials for this call, if any.
      Returns:
      the call credentials
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.