Class ThriftClients
URI
or an EndpointGroup
.-
Method Summary
Modifier and TypeMethodDescriptionstatic ThriftClientBuilder
builder
(Scheme scheme, EndpointGroup endpointGroup) Returns a newThriftClientBuilder
that builds the client that connects to the specifiedEndpointGroup
with the specifiedScheme
.static ThriftClientBuilder
builder
(SessionProtocol protocol, EndpointGroup endpointGroup) Returns a newThriftClientBuilder
that builds the Thrift client that connects to the specifiedEndpointGroup
with the specifiedSessionProtocol
andThriftSerializationFormats.BINARY
.static ThriftClientBuilder
Returns a newThriftClientBuilder
that builds the client that connects to the specifieduri
.static ThriftClientBuilder
builder
(String scheme, EndpointGroup endpointGroup) Returns a newThriftClientBuilder
that builds the client that connects to the specifiedEndpointGroup
with the specifiedscheme
.static ThriftClientBuilder
Returns a newThriftClientBuilder
that builds the client that connects to the specifiedURI
.static <T> T
newClient
(Scheme scheme, EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedScheme
using the defaultClientFactory
.static <T> T
newClient
(SessionProtocol protocol, EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedSessionProtocol
andThriftSerializationFormats.BINARY
using the defaultClientFactory
.static <T> T
newClient
(SessionProtocol protocol, EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new client that connects to the specifiedEndpointGroup
with the specifiedSessionProtocol
,path
andThriftSerializationFormats.BINARY
using the defaultClientFactory
.static <T> T
newClient
(String scheme, EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedscheme
using the defaultClientFactory
.static <T> T
newClient
(String scheme, EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedscheme
andpath
using the defaultClientFactory
.static <T> T
Creates a new Thrift client that connects to the specifieduri
using the defaultClientFactory
.static <T> T
Creates a new Thrift client that connects to the specifiedURI
using the defaultClientFactory
.
-
Method Details
-
newClient
Creates a new Thrift client that connects to the specifieduri
using the defaultClientFactory
.Note that if a
SerializationFormat
is not specified in theScheme
component of theuri
,ThriftSerializationFormats.BINARY
will be used by default.- Parameters:
uri
- the URI of the server endpointclientType
- the type of the new Thrift client- Throws:
IllegalArgumentException
- if the specifieduri
is invalid, or the specifiedclientType
is an unsupported Thrift client stub.
-
newClient
Creates a new Thrift client that connects to the specifiedURI
using the defaultClientFactory
.Note that if a
SerializationFormat
is not specified in theScheme
component of theuri
,ThriftSerializationFormats.BINARY
will be used by default.- Parameters:
uri
- theURI
of the server endpointclientType
- the type of the new Thrift client- Throws:
IllegalArgumentException
- if the specifieduri
is invalid, or the specifiedclientType
is an unsupported Thrift client stub.
-
newClient
Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedscheme
using the defaultClientFactory
.Note that if a
SerializationFormat
is not specified in theScheme
component of theuri
,ThriftSerializationFormats.BINARY
will be used by default.- Parameters:
scheme
- theScheme
represented as aString
endpointGroup
- the serverEndpointGroup
clientType
- the type of the new Thrift client- Throws:
IllegalArgumentException
- if the specifiedscheme
is invalid or the specifiedclientType
is an unsupported Thrift client stub.
-
newClient
Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedScheme
using the defaultClientFactory
.Note that if a
SerializationFormat
is not specified in theScheme
component of theuri
,ThriftSerializationFormats.BINARY
will be used by default.- Parameters:
scheme
- theScheme
endpointGroup
- the serverEndpointGroup
clientType
- the type of the new Thrift client- Throws:
IllegalArgumentException
- if the specifiedScheme
is invalid or the specifiedclientType
is an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(String scheme, EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedscheme
andpath
using the defaultClientFactory
.Note that if a
SerializationFormat
is not specified in theScheme
component of theuri
,ThriftSerializationFormats.BINARY
will be used by default.- Parameters:
scheme
- theScheme
represented as aString
endpointGroup
- the serverEndpointGroup
path
- the path to the endpointclientType
- the type of the new client- Throws:
IllegalArgumentException
- if the specifiedScheme
is invalid or the specifiedclientType
is an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(SessionProtocol protocol, EndpointGroup endpointGroup, Class<T> clientType) Creates a new Thrift client that connects to the specifiedEndpointGroup
with the specifiedSessionProtocol
andThriftSerializationFormats.BINARY
using the defaultClientFactory
.- Parameters:
protocol
- theSessionProtocol
endpointGroup
- the serverEndpointGroup
clientType
- the type of the new Thrift client- Throws:
IllegalArgumentException
- if theclientType
is an unsupported Thrift client stub.
-
newClient
public static <T> T newClient(SessionProtocol protocol, EndpointGroup endpointGroup, String path, Class<T> clientType) Creates a new client that connects to the specifiedEndpointGroup
with the specifiedSessionProtocol
,path
andThriftSerializationFormats.BINARY
using the defaultClientFactory
.- Parameters:
protocol
- theSessionProtocol
endpointGroup
- the serverEndpointGroup
path
- the path to the endpointclientType
- the type of the new client- Throws:
IllegalArgumentException
- if theclientType
is an unsupported Thrift client stub.
-
builder
Returns a newThriftClientBuilder
that builds the client that connects to the specifieduri
.Note that if a
SerializationFormat
is not specified in theScheme
component of theuri
,ThriftSerializationFormats.BINARY
will be used by default.- Throws:
IllegalArgumentException
- if the specifieduri
is invalid, or theuri
's scheme contains an invalidSerializationFormat
.
-
builder
Returns a newThriftClientBuilder
that builds the client that connects to the specifiedURI
.Note that if a
SerializationFormat
is not specified in theScheme
component of theURI
,ThriftSerializationFormats.BINARY
will be used by default.- Throws:
IllegalArgumentException
- if the specifiedURI
is invalid, or theURI
's scheme contains an invalidSerializationFormat
.
-
builder
Returns a newThriftClientBuilder
that builds the client that connects to the specifiedEndpointGroup
with the specifiedscheme
.Note that if a
SerializationFormat
is not specified in the givenscheme
,ThriftSerializationFormats.BINARY
will be used by default.- Throws:
IllegalArgumentException
- if thescheme
is invalid.
-
builder
Returns a newThriftClientBuilder
that builds the Thrift client that connects to the specifiedEndpointGroup
with the specifiedSessionProtocol
andThriftSerializationFormats.BINARY
. -
builder
Returns a newThriftClientBuilder
that builds the client that connects to the specifiedEndpointGroup
with the specifiedScheme
.Note that if
SerializationFormat.NONE
is specified in theScheme
,ThriftSerializationFormats.BINARY
will be used by default.
-