Interface HttpServiceProxyRegistry


public interface HttpServiceProxyRegistry
A registry for HTTP service clients organized by HttpServiceGroup.
Since:
7.0
Author:
Rossen Stoyanchev, Olga Maciaszek-Sharma
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <P> P
    getClient(Class<P> httpServiceType)
    Return an HTTP service client from any group as long as there is only one client of this type across all groups.
    <P> P
    getClient(String groupName, Class<P> httpServiceType)
    Return an HTTP service client from the named group.
    Return all HTTP service client types in the named group.
    Return the names of all groups in the registry.
  • Method Details

    • getClient

      <P> P getClient(Class<P> httpServiceType)
      Return an HTTP service client from any group as long as there is only one client of this type across all groups.
      Type Parameters:
      P - the type of HTTP interface client
      Parameters:
      httpServiceType - the type of client
      Returns:
      the matched client
      Throws:
      IllegalArgumentException - if there is no client of the given type, or there is more than one client of the given type.
    • getClient

      <P> P getClient(String groupName, Class<P> httpServiceType)
      Return an HTTP service client from the named group.
      Type Parameters:
      P - the type of HTTP interface client
      Parameters:
      groupName - the name of the group
      httpServiceType - the type of client
      Returns:
      the matched client
      Throws:
      IllegalArgumentException - if there is no matching client.
    • getGroupNames

      Set<String> getGroupNames()
      Return the names of all groups in the registry.
    • getClientTypesInGroup

      Set<Class<?>> getClientTypesInGroup(String groupName)
      Return all HTTP service client types in the named group.
      Parameters:
      groupName - the name of the group
      Returns:
      the HTTP service types
      Throws:
      IllegalArgumentException - if there is no matching group.