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 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()
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)
Invoked once immediately after construction.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areWorkerTokensSupported
protected ThriftConnectionType type
public void prepare(ThriftConnectionType type, Map<String,Object> topoConf)
ITransportPlugin
Invoked once immediately after construction.
prepare
in interface ITransportPlugin
type
- the type of connection this will process.topoConf
- Storm 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 transportserverHost
- unusedasUser
- unusedorg.apache.storm.thrift.transport.TTransportException
protected Subject getDefaultSubject()
Get default subject.
public int getPort()
ITransportPlugin
Get port.
getPort
in interface ITransportPlugin
ITransportPlugin.getServer(org.apache.storm.thrift.TProcessor)
has been calledCopyright © 2022 The Apache Software Foundation. All rights reserved.