Class ArmeriaRetrofit

java.lang.Object
com.linecorp.armeria.client.retrofit2.ArmeriaRetrofit

public final class ArmeriaRetrofit
extends Object
Provides various ways to create a Retrofit which uses WebClient for sending requests.
  • Method Summary

    Modifier and Type Method Description
    static ArmeriaRetrofitBuilder builder​(com.linecorp.armeria.client.WebClient baseWebClient)
    Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests using the specified WebClient.
    static ArmeriaRetrofitBuilder builder​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
    Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified SessionProtocol.
    static ArmeriaRetrofitBuilder builder​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
    Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified SessionProtocol and path.
    static ArmeriaRetrofitBuilder builder​(String baseUrl)
    Returns a new ArmeriaRetrofitBuilder created with the specified baseUrl.
    static ArmeriaRetrofitBuilder builder​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
    Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified protocol.
    static ArmeriaRetrofitBuilder builder​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
    Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified SessionProtocol and path.
    static ArmeriaRetrofitBuilder builder​(URI baseUrl)
    Returns a new ArmeriaRetrofitBuilder created with the specified baseUrl.
    static Retrofit of​(com.linecorp.armeria.client.WebClient baseWebClient)
    Returns a new Retrofit which sends requests using the specified WebClient.
    static Retrofit of​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
    Returns a new Retrofit which sends requests to the specified Endpoint using the specified SessionProtocol.
    static Retrofit of​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
    Returns a new Retrofit which sends requests to the specified Endpoint using the specified SessionProtocol and path.
    static Retrofit of​(String baseUrl)
    Returns a new Retrofit with the specified baseUrl.
    static Retrofit of​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
    Returns a new Retrofit which sends requests to the specified Endpoint using the specified protocol.
    static Retrofit of​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
    Returns a new Retrofit which sends requests to the specified Endpoint using the specified protocol and path.
    static Retrofit of​(URI baseUrl)
    Returns a new Retrofit with the specified baseUrl.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • of

      public static Retrofit of​(String baseUrl)
      Returns a new Retrofit with the specified baseUrl.
      Throws:
      IllegalArgumentException - if the baseUrl is not valid or its scheme is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • of

      public static Retrofit of​(URI baseUrl)
      Returns a new Retrofit with the specified baseUrl.
      Throws:
      IllegalArgumentException - if the baseUrl is not valid or its scheme is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • of

      public static Retrofit of​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
      Returns a new Retrofit which sends requests to the specified Endpoint using the specified protocol.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • of

      public static Retrofit of​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
      Returns a new Retrofit which sends requests to the specified Endpoint using the specified SessionProtocol.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • of

      public static Retrofit of​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
      Returns a new Retrofit which sends requests to the specified Endpoint using the specified protocol and path.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • of

      public static Retrofit of​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
      Returns a new Retrofit which sends requests to the specified Endpoint using the specified SessionProtocol and path.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • of

      public static Retrofit of​(com.linecorp.armeria.client.WebClient baseWebClient)
      Returns a new Retrofit which sends requests using the specified WebClient.
    • builder

      public static ArmeriaRetrofitBuilder builder​(String baseUrl)
      Returns a new ArmeriaRetrofitBuilder created with the specified baseUrl.
      Throws:
      IllegalArgumentException - if the baseUrl is not valid or its scheme is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • builder

      public static ArmeriaRetrofitBuilder builder​(URI baseUrl)
      Returns a new ArmeriaRetrofitBuilder created with the specified baseUrl.
      Throws:
      IllegalArgumentException - if the baseUrl is not valid or its scheme is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • builder

      public static ArmeriaRetrofitBuilder builder​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
      Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified protocol.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • builder

      public static ArmeriaRetrofitBuilder builder​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup)
      Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified SessionProtocol.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • builder

      public static ArmeriaRetrofitBuilder builder​(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
      Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified SessionProtocol and path.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • builder

      public static ArmeriaRetrofitBuilder builder​(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path)
      Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests to the specified EndpointGroup using the specified SessionProtocol and path.
      Throws:
      IllegalArgumentException - if the protocol is not one of the values in SessionProtocol.httpValues() or SessionProtocol.httpsValues().
    • builder

      public static ArmeriaRetrofitBuilder builder​(com.linecorp.armeria.client.WebClient baseWebClient)
      Returns a new ArmeriaRetrofitBuilder that builds a client that sends requests using the specified WebClient.