Interface ProxyConfig<A,S>

Type Parameters:
A - the type of service addresses
S - the type of service stubs
All Known Implementing Classes:
AbstractConfig, DiscoveryConfig, EndpointConfig

public interface ProxyConfig<A,S>
The configuration of service proxies.
Author:
Fabio Simeoni
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    addProperty(String name, T value)
    Adds a custom property to the configuration.
    void
    addProperty(Property<?> property)
    Adds a custom property to the configuration.
    boolean
    hasProperty(String property)
    Returns true if the configuration includes a given custom property.
    Returns the ProxyPlugin.
    <T> T
    property(String property, Class<T> clazz)
    Returns the value of a given custom property.
    long
    Returns the timeout.
  • Method Details

    • timeout

      long timeout()
      Returns the timeout.
      Returns:
      the timeout
    • plugin

      ProxyPlugin<A,S,?> plugin()
      Returns the ProxyPlugin.
      Returns:
      the plugin
    • addProperty

      <T> void addProperty(String name, T value)
      Adds a custom property to the configuration.
      Type Parameters:
      T - the type of the property value
      Parameters:
      name - the name of the property
      value - the value of the property
    • addProperty

      void addProperty(Property<?> property)
      Adds a custom property to the configuration.
      Parameters:
      property - the property
    • hasProperty

      boolean hasProperty(String property)
      Returns true if the configuration includes a given custom property.
      Parameters:
      property - the name of the property
      Returns:
      true if the configuration has the property, false otherwise
    • property

      <T> T property(String property, Class<T> clazz) throws IllegalStateException, IllegalArgumentException
      Returns the value of a given custom property.
      Type Parameters:
      T - the type of the property value
      Parameters:
      property - the name of the property
      clazz - the type of the property value
      Returns:
      the property value
      Throws:
      IllegalStateException - if the property is not included in the configuration
      IllegalArgumentException - if the property exists but its value has a different value