org.apache.flume.api

## Class SecureThriftRpcClient.UgiSaslClientTransport

- java.lang.Object
- - org.apache.thrift.transport.TTransport
  - - org.apache.thrift.transport.TSaslClientTransport
    - - org.apache.flume.api.SecureThriftRpcClient.UgiSaslClientTransport

- Enclosing class:
    SecureThriftRpcClient

      public static class SecureThriftRpcClient.UgiSaslClientTransport
      extends org.apache.thrift.transport.TSaslClientTransport

  This transport wraps the Sasl transports to set up the right UGI context for open().

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `org.apache.thrift.transport.TSaslTransport.NegotiationStatus`
    `protected static class` | `org.apache.thrift.transport.TSaslTransport.SaslResponse`
    `protected static class` | `org.apache.thrift.transport.TSaslTransport.SaslRole`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `DEFAULT_MAX_LENGTH`
    `protected static int` | `MECHANISM_NAME_BYTES`
    `protected static int` | `PAYLOAD_LENGTH_BYTES`
    `protected static int` | `STATUS_BYTES`
    `protected org.apache.thrift.transport.TTransport` | `underlyingTransport`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SecureThriftRpcClient.UgiSaslClientTransport(String mechanism, String authorizationId, String protocol, String serverName, Map<String,String> props, CallbackHandler cbh, org.apache.thrift.transport.TTransport transport, PrivilegedExecutor privilegedExecutor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `open()` Open the SASL transport with using the current UserGroupInformation.
    `protected int` | `readLength()`
    `protected org.apache.thrift.transport.TSaslTransport.SaslResponse` | `receiveSaslMessage()`
    `protected void` | `sendAndThrowMessage(org.apache.thrift.transport.TSaslTransport.NegotiationStatus arg0, String arg1)`
    `protected void` | `sendSaslMessage(org.apache.thrift.transport.TSaslTransport.NegotiationStatus arg0, byte[] arg1)`
    `protected void` | `setSaslServer(SaslServer arg0)`
    `protected void` | `writeLength(int arg0)`

    - ### Methods inherited from class org.apache.thrift.transport.TSaslClientTransport

      `getRole, handleSaslStartMessage`

    - ### Methods inherited from class org.apache.thrift.transport.TTransport

      `consumeBuffer, getBuffer, getBufferPosition, getBytesRemainingInBuffer, peek, readAll, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_MAX_LENGTH

          protected static final int DEFAULT_MAX_LENGTH

      See Also:
        Constant Field Values

    - #### MECHANISM_NAME_BYTES

          protected static final int MECHANISM_NAME_BYTES

      See Also:
        Constant Field Values

    - #### STATUS_BYTES

          protected static final int STATUS_BYTES

      See Also:
        Constant Field Values

    - #### PAYLOAD_LENGTH_BYTES

          protected static final int PAYLOAD_LENGTH_BYTES

      See Also:
        Constant Field Values

    - #### underlyingTransport

          protected org.apache.thrift.transport.TTransport underlyingTransport

  - ### Constructor Detail

    - #### SecureThriftRpcClient.UgiSaslClientTransport

          public SecureThriftRpcClient.UgiSaslClientTransport(String mechanism,
                                                      String authorizationId,
                                                      String protocol,
                                                      String serverName,
                                                      Map<String,String> props,
                                                      CallbackHandler cbh,
                                                      org.apache.thrift.transport.TTransport transport,
                                                      PrivilegedExecutor privilegedExecutor)
                                                       throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### open

          public void open()
                    throws FlumeException

      Open the SASL transport with using the current UserGroupInformation. This is needed to get the current login context stored
      Overrides:
        `open` in class `org.apache.thrift.transport.TSaslClientTransport`
      Throws:
        `FlumeException`

    - #### setSaslServer

          protected void setSaslServer(SaslServer arg0)

    - #### sendSaslMessage

          protected void sendSaslMessage(org.apache.thrift.transport.TSaslTransport.NegotiationStatus arg0,
                             byte[] arg1)
                                  throws org.apache.thrift.transport.TTransportException

      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### receiveSaslMessage

          protected org.apache.thrift.transport.TSaslTransport.SaslResponse receiveSaslMessage()
                                                                                        throws org.apache.thrift.transport.TTransportException

      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### sendAndThrowMessage

          protected void sendAndThrowMessage(org.apache.thrift.transport.TSaslTransport.NegotiationStatus arg0,
                                 String arg1)
                                      throws org.apache.thrift.transport.TTransportException

      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### readLength

          protected int readLength()
                            throws org.apache.thrift.transport.TTransportException

      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### writeLength

          protected void writeLength(int arg0)
                              throws org.apache.thrift.transport.TTransportException

      Throws:
        `org.apache.thrift.transport.TTransportException`

Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.