Interface ServerFeature.RoutingBuilders

Enclosing interface:
ServerFeature

public static interface ServerFeature.RoutingBuilders
Access to builders of various routing types.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasRouting(Class<?> builderType)
    Check whether a specific routing builder is available.
    <T extends Builder<T, ?>>
    T
    routingBuilder(Class<T> builderType)
    Obtain the routing builder for the provided type.
    default <T extends Builder<T, ?>>
    T
    routingBuilder(Class<T> builderType, Supplier<T> builderSupplier)
    Get the routing builder for the provided type, or create a new builder.
  • Method Details

    • hasRouting

      boolean hasRouting(Class<?> builderType)
      Check whether a specific routing builder is available.
      Parameters:
      builderType - type of the routing builder
      Returns:
      true if such a routing exists
    • routingBuilder

      <T extends Builder<T, ?>> T routingBuilder(Class<T> builderType)
      Obtain the routing builder for the provided type.
      Type Parameters:
      T - type that is expected
      Parameters:
      builderType - type of the routing builder
      Returns:
      instance of the routing builder
      Throws:
      NoSuchElementException - in case the routing is not avialable
      See Also:
    • routingBuilder

      default <T extends Builder<T, ?>> T routingBuilder(Class<T> builderType, Supplier<T> builderSupplier)
      Get the routing builder for the provided type, or create a new builder.

      Default implementation of this method always returns a builder, though if created using builderSupplier it is ignored by the server.

      Type Parameters:
      T - type that is expected
      Parameters:
      builderType - type of the routing builder
      builderSupplier - supplier of a new builder instance
      Returns:
      instance of the routing builder