public static class TSaslServerTransport.Factory extends TTransportFactory
TTransportFactory to create
TSaslServerTransports. Ensures that a given
underlying TTransport instance receives the same
TSaslServerTransport. This is kind of an awful hack to work
around the fact that Thrift is designed assuming that
TTransport instances are stateless, and thus the existing
TServers use different TTransport instances for
input and output. | Constructor and Description |
|---|
Factory()
Create a new Factory.
|
Factory(java.lang.String mechanism,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map<java.lang.String,java.lang.String> props,
javax.security.auth.callback.CallbackHandler cbh)
Create a new
Factory, initially with the single server
definition given. |
| Modifier and Type | Method and Description |
|---|---|
void |
addServerDefinition(java.lang.String mechanism,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map<java.lang.String,java.lang.String> props,
javax.security.auth.callback.CallbackHandler cbh)
Add a supported server definition to the transports created by this
factory.
|
TTransport |
getTransport(TTransport base)
Get a new
TSaslServerTransport instance, or reuse the
existing one if a TSaslServerTransport has already been
created before using the given TTransport as an underlying
transport. |
public Factory()
addServerDefinition will
be called later.public Factory(java.lang.String mechanism,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map<java.lang.String,java.lang.String> props,
javax.security.auth.callback.CallbackHandler cbh)
Factory, initially with the single server
definition given. You may still call addServerDefinition
later. See the Java documentation for Sasl.createSaslServer
for the details of the parameters.public void addServerDefinition(java.lang.String mechanism,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map<java.lang.String,java.lang.String> props,
javax.security.auth.callback.CallbackHandler cbh)
Sasl.createSaslServer for the details of the parameters.public TTransport getTransport(TTransport base)
TSaslServerTransport instance, or reuse the
existing one if a TSaslServerTransport has already been
created before using the given TTransport as an underlying
transport. This ensures that a given underlying transport instance
receives the same TSaslServerTransport.getTransport in class TTransportFactorybase - The base transport