Class ThriftClients
URI or an EndpointGroup.-
Method Summary
Modifier and TypeMethodDescriptionstatic ThriftClientBuilderbuilder(com.linecorp.armeria.common.Scheme scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newThriftClientBuilderthat builds the client that connects to the specifiedEndpointGroupwith the specifiedScheme.static ThriftClientBuilderbuilder(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newThriftClientBuilderthat builds the Thrift client that connects to the specifiedEndpointGroupwith the specifiedSessionProtocolandThriftSerializationFormats.BINARY.static ThriftClientBuilderReturns a newThriftClientBuilderthat builds the client that connects to the specifieduri.static ThriftClientBuilderReturns a newThriftClientBuilderthat builds the client that connects to the specifiedEndpointGroupwith the specifiedscheme.static ThriftClientBuilderReturns a newThriftClientBuilderthat builds the client that connects to the specifiedURI.static <T> TnewClient(com.linecorp.armeria.common.Scheme scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedSchemeusing the defaultClientFactory.static <T> TnewClient(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedSessionProtocolandThriftSerializationFormats.BINARYusing the defaultClientFactory.static <T> TnewClient(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new client that connects to the specifiedEndpointGroupwith the specifiedSessionProtocol,pathandThriftSerializationFormats.BINARYusing the defaultClientFactory.static <T> TnewClient(String scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedschemeusing the defaultClientFactory.static <T> TnewClient(String scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedschemeandpathusing the defaultClientFactory.static <T> TCreates a new Thrift client that connects to the specifieduriusing the defaultClientFactory.static <T> TCreates a new Thrift client that connects to the specifiedURIusing the defaultClientFactory.
-
Method Details
-
newClient
Creates a new Thrift client that connects to the specifieduriusing the defaultClientFactory.Note that if a
SerializationFormatis not specified in theSchemecomponent of theuri,ThriftSerializationFormats.BINARYwill be used by default.- Parameters:
uri- the URI of the server endpointclientType- the type of the new Thrift client- Throws:
IllegalArgumentException- if the specifieduriis invalid, or the specifiedclientTypeis an unsupported Thrift client stub.
-
newClient
Creates a new Thrift client that connects to the specifiedURIusing the defaultClientFactory.Note that if a
SerializationFormatis not specified in theSchemecomponent of theuri,ThriftSerializationFormats.BINARYwill be used by default.- Parameters:
uri- theURIof the server endpointclientType- the type of the new Thrift client- Throws:
IllegalArgumentException- if the specifieduriis invalid, or the specifiedclientTypeis an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(String scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedschemeusing the defaultClientFactory.Note that if a
SerializationFormatis not specified in theSchemecomponent of theuri,ThriftSerializationFormats.BINARYwill be used by default.- Parameters:
scheme- theSchemerepresented as aStringendpointGroup- the serverEndpointGroupclientType- the type of the new Thrift client- Throws:
IllegalArgumentException- if the specifiedschemeis invalid or the specifiedclientTypeis an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(com.linecorp.armeria.common.Scheme scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedSchemeusing the defaultClientFactory.Note that if a
SerializationFormatis not specified in theSchemecomponent of theuri,ThriftSerializationFormats.BINARYwill be used by default.- Parameters:
scheme- theSchemeendpointGroup- the serverEndpointGroupclientType- the type of the new Thrift client- Throws:
IllegalArgumentException- if the specifiedSchemeis invalid or the specifiedclientTypeis an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(String scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedschemeandpathusing the defaultClientFactory.Note that if a
SerializationFormatis not specified in theSchemecomponent of theuri,ThriftSerializationFormats.BINARYwill be used by default.- Parameters:
scheme- theSchemerepresented as aStringendpointGroup- the serverEndpointGrouppath- the path to the endpointclientType- the type of the new client- Throws:
IllegalArgumentException- if the specifiedSchemeis invalid or the specifiedclientTypeis an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroupwith the specifiedSessionProtocolandThriftSerializationFormats.BINARYusing the defaultClientFactory.- Parameters:
protocol- theSessionProtocolendpointGroup- the serverEndpointGroupclientType- the type of the new Thrift client- Throws:
IllegalArgumentException- if theclientTypeis an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new client that connects to the specifiedEndpointGroupwith the specifiedSessionProtocol,pathandThriftSerializationFormats.BINARYusing the defaultClientFactory.- Parameters:
protocol- theSessionProtocolendpointGroup- the serverEndpointGrouppath- the path to the endpointclientType- the type of the new client- Throws:
IllegalArgumentException- if theclientTypeis an unsupported Thrift client stub.
-
builder
Returns a newThriftClientBuilderthat builds the client that connects to the specifieduri.Note that if a
SerializationFormatis not specified in theSchemecomponent of theuri,ThriftSerializationFormats.BINARYwill be used by default.- Throws:
IllegalArgumentException- if the specifieduriis invalid, or theuri's scheme contains an invalidSerializationFormat.
-
builder
Returns a newThriftClientBuilderthat builds the client that connects to the specifiedURI.Note that if a
SerializationFormatis not specified in theSchemecomponent of theURI,ThriftSerializationFormats.BINARYwill be used by default.- Throws:
IllegalArgumentException- if the specifiedURIis invalid, or theURI's scheme contains an invalidSerializationFormat.
-
builder
public static ThriftClientBuilder builder(String scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newThriftClientBuilderthat builds the client that connects to the specifiedEndpointGroupwith the specifiedscheme.Note that if a
SerializationFormatis not specified in the givenscheme,ThriftSerializationFormats.BINARYwill be used by default.- Throws:
IllegalArgumentException- if theschemeis invalid.
-
builder
public static ThriftClientBuilder builder(com.linecorp.armeria.common.SessionProtocol protocol, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newThriftClientBuilderthat builds the Thrift client that connects to the specifiedEndpointGroupwith the specifiedSessionProtocolandThriftSerializationFormats.BINARY. -
builder
public static ThriftClientBuilder builder(com.linecorp.armeria.common.Scheme scheme, com.linecorp.armeria.client.endpoint.EndpointGroup endpointGroup) Returns a newThriftClientBuilderthat builds the client that connects to the specifiedEndpointGroupwith the specifiedScheme.Note that if
SerializationFormat.NONEis specified in theScheme,ThriftSerializationFormats.BINARYwill be used by default.
-