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 ArmeriaRetrofitBuilder
Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests using the specifiedWebClient
.static ArmeriaRetrofitBuilder
builder
(SessionProtocol protocol, EndpointGroup endpointGroup) Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedSessionProtocol
.static ArmeriaRetrofitBuilder
builder
(SessionProtocol protocol, EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedSessionProtocol
andpath
.static ArmeriaRetrofitBuilder
Returns a newArmeriaRetrofitBuilder
created with the specifiedbaseUrl
.static ArmeriaRetrofitBuilder
builder
(String protocol, EndpointGroup endpointGroup) Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedprotocol
.static ArmeriaRetrofitBuilder
builder
(String protocol, EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedSessionProtocol
andpath
.static ArmeriaRetrofitBuilder
Returns a newArmeriaRetrofitBuilder
created with the specifiedbaseUrl
.static retrofit2.Retrofit
Returns a newRetrofit
which sends requests using the specifiedWebClient
.static retrofit2.Retrofit
of
(SessionProtocol protocol, EndpointGroup endpointGroup) Returns a newRetrofit
which sends requests to the specifiedEndpoint
using the specifiedSessionProtocol
.static retrofit2.Retrofit
of
(SessionProtocol protocol, EndpointGroup endpointGroup, String path) Returns a newRetrofit
which sends requests to the specifiedEndpoint
using the specifiedSessionProtocol
andpath
.static retrofit2.Retrofit
Returns a newRetrofit
with the specifiedbaseUrl
.static retrofit2.Retrofit
of
(String protocol, EndpointGroup endpointGroup) static retrofit2.Retrofit
of
(String protocol, EndpointGroup endpointGroup, String path) Returns a newRetrofit
which sends requests to the specifiedEndpoint
using the specifiedprotocol
andpath
.static retrofit2.Retrofit
Returns a newRetrofit
with the specifiedbaseUrl
.
-
Method Details
-
of
Returns a newRetrofit
with the specifiedbaseUrl
.- Throws:
IllegalArgumentException
- if thebaseUrl
is not valid or its scheme is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
of
Returns a newRetrofit
with the specifiedbaseUrl
.- Throws:
IllegalArgumentException
- if thebaseUrl
is not valid or its scheme is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
of
- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
of
Returns a newRetrofit
which sends requests to the specifiedEndpoint
using the specifiedSessionProtocol
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
of
Returns a newRetrofit
which sends requests to the specifiedEndpoint
using the specifiedprotocol
andpath
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
of
public static retrofit2.Retrofit of(SessionProtocol protocol, EndpointGroup endpointGroup, String path) Returns a newRetrofit
which sends requests to the specifiedEndpoint
using the specifiedSessionProtocol
andpath
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
of
Returns a newRetrofit
which sends requests using the specifiedWebClient
. -
builder
Returns a newArmeriaRetrofitBuilder
created with the specifiedbaseUrl
.- Throws:
IllegalArgumentException
- if thebaseUrl
is not valid or its scheme is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
builder
Returns a newArmeriaRetrofitBuilder
created with the specifiedbaseUrl
.- Throws:
IllegalArgumentException
- if thebaseUrl
is not valid or its scheme is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
builder
Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedprotocol
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
builder
Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedSessionProtocol
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
builder
public static ArmeriaRetrofitBuilder builder(String protocol, EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedSessionProtocol
andpath
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
builder
public static ArmeriaRetrofitBuilder builder(SessionProtocol protocol, EndpointGroup endpointGroup, String path) Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests to the specifiedEndpointGroup
using the specifiedSessionProtocol
andpath
.- Throws:
IllegalArgumentException
- if theprotocol
is not one of the values inSessionProtocol.httpValues()
orSessionProtocol.httpsValues()
.
-
builder
Returns a newArmeriaRetrofitBuilder
that builds a client that sends requests using the specifiedWebClient
.
-