Class ArmeriaRetrofit
java.lang.Object
com.linecorp.armeria.client.retrofit2.ArmeriaRetrofit
Provides various ways to create a
Retrofit which uses WebClient for sending requests.-
Method Summary
Modifier and TypeMethodDescriptionstatic ArmeriaRetrofitBuilderbuilder(com.linecorp.armeria.client.WebClient baseWebClient) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests using the specifiedWebClient.static ArmeriaRetrofitBuilderbuilder(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedSessionProtocol.static ArmeriaRetrofitBuilderbuilder(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedSessionProtocolandpath.static ArmeriaRetrofitBuilderReturns a newArmeriaRetrofitBuildercreated with the specifiedbaseUrl.static ArmeriaRetrofitBuilderReturns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedprotocol.static ArmeriaRetrofitBuilderbuilder(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedSessionProtocolandpath.static ArmeriaRetrofitBuilderReturns a newArmeriaRetrofitBuildercreated with the specifiedbaseUrl.static Retrofitof(com.linecorp.armeria.client.WebClient baseWebClient) Returns a newRetrofitwhich sends requests using the specifiedWebClient.static Retrofitof(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newRetrofitwhich sends requests to the specifiedEndpointusing the specifiedSessionProtocol.static Retrofitof(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newRetrofitwhich sends requests to the specifiedEndpointusing the specifiedSessionProtocolandpath.static RetrofitReturns a newRetrofitwith the specifiedbaseUrl.static Retrofitstatic RetrofitReturns a newRetrofitwhich sends requests to the specifiedEndpointusing the specifiedprotocolandpath.static RetrofitReturns a newRetrofitwith the specifiedbaseUrl.
-
Method Details
-
of
Returns a newRetrofitwith the specifiedbaseUrl.- Throws:
IllegalArgumentException- if thebaseUrlis not valid or its scheme is not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
of
Returns a newRetrofitwith the specifiedbaseUrl.- Throws:
IllegalArgumentException- if thebaseUrlis not valid or its scheme is not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
of
public static Retrofit of(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) - Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
of
public static Retrofit of(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newRetrofitwhich sends requests to the specifiedEndpointusing the specifiedSessionProtocol.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
of
public static Retrofit of(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newRetrofitwhich sends requests to the specifiedEndpointusing the specifiedprotocolandpath.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
of
public static Retrofit of(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newRetrofitwhich sends requests to the specifiedEndpointusing the specifiedSessionProtocolandpath.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
of
Returns a newRetrofitwhich sends requests using the specifiedWebClient. -
builder
Returns a newArmeriaRetrofitBuildercreated with the specifiedbaseUrl.- Throws:
IllegalArgumentException- if thebaseUrlis not valid or its scheme is not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
builder
Returns a newArmeriaRetrofitBuildercreated with the specifiedbaseUrl.- Throws:
IllegalArgumentException- if thebaseUrlis not valid or its scheme is not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
builder
public static ArmeriaRetrofitBuilder builder(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedprotocol.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
builder
public static ArmeriaRetrofitBuilder builder(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedSessionProtocol.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
builder
public static ArmeriaRetrofitBuilder builder(String protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedSessionProtocolandpath.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
builder
public static ArmeriaRetrofitBuilder builder(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests to the specifiedEndpointGroupusing the specifiedSessionProtocolandpath.- Throws:
IllegalArgumentException- if theprotocolis not one of the values inSessionProtocol.httpValues()orSessionProtocol.httpsValues().
-
builder
Returns a newArmeriaRetrofitBuilderthat builds a client that sends requests using the specifiedWebClient.
-