|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.thrift.transport.TTransport
org.apache.thrift.transport.TSaslServerTransport
public class TSaslServerTransport
Wraps another Thrift TTransport, but performs SASL server
negotiation on the call to open(). This class will wrap ensuing
communication over it, if a SASL QOP is negotiated with the other party.
| Nested Class Summary | |
|---|---|
static class |
TSaslServerTransport.Factory
TTransportFactory to create
TSaslServerTransports |
| Constructor Summary | |
|---|---|
TSaslServerTransport(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,
TTransport transport)
Creates a SaslServer using the given SASL-specific parameters. |
|
TSaslServerTransport(TTransport transport)
Uses the given underlying transport. |
|
| Method Summary | |
|---|---|
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 this transport. |
void |
close()
Closes the underlying transport and disposes of the SASL implementation underlying this transport. |
void |
flush()
Flushes to the underlying transport. |
javax.security.sasl.SaslClient |
getSaslClient()
Get the underlying SaslClient. |
javax.security.sasl.SaslServer |
getSaslServer()
Get the underlying SaslServer. |
boolean |
isOpen()
True if the underlying transport is open and the SASL handshake is complete. |
void |
open()
Opens the underlying transport if it's not already open and then performs SASL negotiation. |
int |
read(byte[] buf,
int off,
int len)
Read from the underlying transport. |
void |
write(byte[] buf,
int off,
int len)
Write to the underlying transport. |
| Methods inherited from class org.apache.thrift.transport.TTransport |
|---|
consumeBuffer, getBuffer, getBufferPosition, getBytesRemainingInBuffer, peek, readAll, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TSaslServerTransport(TTransport transport)
transport - Transport underlying this one.
public TSaslServerTransport(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,
TTransport transport)
SaslServer using the given SASL-specific parameters.
See the Java documentation for Sasl.createSaslServer for the
details of the parameters.
transport - The underlying Thrift transport.| Method Detail |
|---|
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 void open()
throws TTransportException
open in class TTransportTTransportException - if the transport could not be openedpublic javax.security.sasl.SaslClient getSaslClient()
SaslClient.
SaslClient, or null if this transport
is backed by a SaslServer.public javax.security.sasl.SaslServer getSaslServer()
SaslServer.
SaslServer, or null if this transport
is backed by a SaslClient.public void close()
close in class TTransportpublic boolean isOpen()
isOpen in class TTransport
public int read(byte[] buf,
int off,
int len)
throws TTransportException
read in class TTransportbuf - Array to read intooff - Index to start reading atlen - Maximum number of bytes to read
TTransportException - if there was an error reading data
public void write(byte[] buf,
int off,
int len)
throws TTransportException
write in class TTransportbuf - The output data bufferoff - The offset to start writing fromlen - The number of bytes to write
TTransportException - if there was an error writing data
public void flush()
throws TTransportException
flush in class TTransportTTransportException - if there was an error writing out data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||