@ThreadSafe public final class NoSaslTransportProvider extends Object implements TransportProvider
AuthType.NOSASL
, we use this transport provider which simply
uses default Thrift TTransport
.TransportProvider.Factory
Constructor and Description |
---|
NoSaslTransportProvider()
Constructor for transport provider when authentication type is
AuthType.NOSASL . |
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
TransportProvider.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. |
public NoSaslTransportProvider()
AuthType.NOSASL
.public org.apache.thrift.transport.TTransport getClientTransport(InetSocketAddress serverAddress)
TransportProvider
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.getClientTransport
in interface TransportProvider
serverAddress
- the server address which clients will connect topublic org.apache.thrift.transport.TTransport getClientTransport(Subject subject, InetSocketAddress serverAddress)
TransportProvider
TransportProvider.getClientTransport(InetSocketAddress)
but it also
specifies the Subject
explicitly.getClientTransport
in interface TransportProvider
subject
- the subject, set to null if not presentserverAddress
- the server address which clients will connect topublic org.apache.thrift.transport.TTransportFactory getServerTransportFactory(String serverName)
TransportProvider
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.getServerTransportFactory
in interface TransportProvider
serverName
- the name for this serverpublic org.apache.thrift.transport.TTransportFactory getServerTransportFactory(Runnable runnable, String serverName)
TransportProvider
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.getServerTransportFactory
in interface TransportProvider
runnable
- a closure to run after the transport is establishedserverName
- the name for this serverCopyright © 2023. All Rights Reserved.