public interface TransportProvider
Modifier and Type | Interface and Description |
---|---|
static class |
TransportProvider.Factory
Factory for
TransportProvider . |
Modifier and Type | Method and Description |
---|---|
org.apache.thrift.transport.TTransport |
getClientTransport(InetSocketAddress serverAddress)
Creates a transport per the connection options.
|
org.apache.thrift.transport.TTransport |
getClientTransport(Subject subject,
InetSocketAddress serverAddress)
Similar as
getClientTransport(InetSocketAddress) but it also
specifies the Subject explicitly. |
org.apache.thrift.transport.TTransportFactory |
getServerTransportFactory(Runnable runnable,
String serverName)
For server side, this method returns a
TTransportFactory based on the auth type. |
org.apache.thrift.transport.TTransportFactory |
getServerTransportFactory(String serverName)
For server side, this method returns a
TTransportFactory based on the auth type. |
org.apache.thrift.transport.TTransport getClientTransport(InetSocketAddress serverAddress) throws UnauthenticatedException
AuthType.NOSASL
, AuthType.SIMPLE
, {link@ AuthType#CUSTOM},
AuthType.KERBEROS
. With NOSASL as input, an unmodified TTransport
is returned;
with SIMPLE/CUSTOM as input, a PlainClientTransport is returned; KERBEROS is not supported
currently. If the auth type is not supported or recognized, an
UnsupportedOperationException
is thrown.serverAddress
- the server address which clients will connect toUnauthenticatedException
org.apache.thrift.transport.TTransport getClientTransport(Subject subject, InetSocketAddress serverAddress) throws UnauthenticatedException
getClientTransport(InetSocketAddress)
but it also
specifies the Subject
explicitly.subject
- the subject, set to null if not presentserverAddress
- the server address which clients will connect toUnauthenticatedException
org.apache.thrift.transport.TTransportFactory getServerTransportFactory(String serverName) throws SaslException
TTransportFactory
based on the auth type. It is
used as one argument to build a Thrift TServer
. If the auth
type is not supported or recognized, an UnsupportedOperationException
is thrown.serverName
- the name for this serverSaslException
- if building a TransportFactory failsorg.apache.thrift.transport.TTransportFactory getServerTransportFactory(Runnable runnable, String serverName) throws SaslException
TTransportFactory
based on the auth type. It is
used as one argument to build a Thrift TServer
. If the auth
type is not supported or recognized, an UnsupportedOperationException
is thrown.runnable
- a closure to run after the transport is establishedserverName
- the name for this serverSaslException
- if building a TransportFactory failsCopyright © 2023. All Rights Reserved.