org.apache.storm.security.auth

## Class SimpleTransportPlugin

- java.lang.Object
- - org.apache.storm.security.auth.SimpleTransportPlugin

- All Implemented Interfaces:
    ITransportPlugin
  Direct Known Subclasses:
    SingleUserSimpleTransport

      public class SimpleTransportPlugin
      extends Object
      implements ITransportPlugin

  Simple transport for Thrift plugin.

  This plugin is designed to be backward compatible with existing Storm code.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Configuration` | `loginConf`
    `protected Map<String,Object>` | `topoConf`
    `protected ThriftConnectionType` | `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleTransportPlugin()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.storm.thrift.transport.TTransport` | `connect(org.apache.storm.thrift.transport.TTransport transport, String serverHost, String asUser)` Connect to the specified server via framed transport.
    `protected Subject` | `getDefaultSubject()` Get default subject.
    `int` | `getPort()` Get port.
    `org.apache.storm.thrift.server.TServer` | `getServer(org.apache.storm.thrift.TProcessor processor)` Create a server associated with a given port, service handler, and purpose.
    `void` | `prepare(ThriftConnectionType type, Map<String,Object> topoConf, Configuration loginConf)` Invoked once immediately after construction.

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

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

    - ### Methods inherited from interface org.apache.storm.security.auth.ITransportPlugin

      `areWorkerTokensSupported`

- - ### Field Detail

    - #### type

          protected ThriftConnectionType type

    - #### topoConf

          protected Map<String,Object> topoConf

    - #### loginConf

          protected Configuration loginConf

  - ### Constructor Detail

    - #### SimpleTransportPlugin

          public SimpleTransportPlugin()

  - ### Method Detail

    - #### prepare

          public void prepare(ThriftConnectionType type,
                              Map<String,Object> topoConf,
                              Configuration loginConf)

      Description copied from interface: `ITransportPlugin`

      Invoked once immediately after construction.

      Specified by:
        `prepare` in interface `ITransportPlugin`
      Parameters:
        `type` - the type of connection this will process.
        `topoConf` - Storm configuration
        `loginConf` - login configuration

    - #### getServer

          public org.apache.storm.thrift.server.TServer getServer(org.apache.storm.thrift.TProcessor processor)
                                                           throws IOException,
                                                                  org.apache.storm.thrift.transport.TTransportException

      Description copied from interface: `ITransportPlugin`

      Create a server associated with a given port, service handler, and purpose.

      Specified by:
        `getServer` in interface `ITransportPlugin`
      Parameters:
        `processor` - service handler
      Returns:
        server
      Throws:
        `IOException`
        `org.apache.storm.thrift.transport.TTransportException`

    - #### connect

          public org.apache.storm.thrift.transport.TTransport connect(org.apache.storm.thrift.transport.TTransport transport,
                                                                      String serverHost,
                                                                      String asUser)
                                                               throws org.apache.storm.thrift.transport.TTransportException

      Connect to the specified server via framed transport.

      Specified by:
        `connect` in interface `ITransportPlugin`
      Parameters:
        `transport` - The underlying Thrift transport
        `serverHost` - unused
        `asUser` - unused
      Throws:
        `org.apache.storm.thrift.transport.TTransportException`

    - #### getDefaultSubject

          protected Subject getDefaultSubject()

      Get default subject.

      Returns:
        the subject that will be used for all connections

    - #### getPort

          public int getPort()

      Description copied from interface: `ITransportPlugin`

      Get port.

      Specified by:
        `getPort` in interface `ITransportPlugin`
      Returns:
        The port this transport is using. This is not known until `ITransportPlugin.getServer(org.apache.storm.thrift.TProcessor)` has been called

Copyright © 2019 The Apache Software Foundation. All rights reserved.