public class SimpleTransportPlugin extends Object implements ITransportPlugin
Simple transport for Thrift plugin.
This plugin is designed to be backward compatible with existing Storm code.
Modifier and Type | Field and Description |
---|---|
protected Configuration |
login_conf |
protected Map<String,Object> |
topoConf |
protected ThriftConnectionType |
type |
Constructor and Description |
---|
SimpleTransportPlugin() |
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() |
int |
getPort() |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areWorkerTokensSupported
protected ThriftConnectionType type
protected Configuration login_conf
public void prepare(ThriftConnectionType type, Map<String,Object> topoConf, Configuration loginConf)
ITransportPlugin
Invoked once immediately after construction
prepare
in interface ITransportPlugin
type
- the type of connection this will process.topoConf
- Storm configurationloginConf
- login configurationpublic org.apache.storm.thrift.server.TServer getServer(org.apache.storm.thrift.TProcessor processor) throws IOException, org.apache.storm.thrift.transport.TTransportException
ITransportPlugin
Create a server associated with a given port, service handler, and purpose
getServer
in interface ITransportPlugin
processor
- service handlerIOException
org.apache.storm.thrift.transport.TTransportException
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
connect
in interface ITransportPlugin
transport
- The underlying Thrift transport.serverHost
- unused.asUser
- unused.org.apache.storm.thrift.transport.TTransportException
protected Subject getDefaultSubject()
public int getPort()
getPort
in interface ITransportPlugin
ITransportPlugin.getServer(org.apache.storm.thrift.TProcessor)
has been called.Copyright © 2019 The Apache Software Foundation. All rights reserved.