use of org.apache.storm.thrift.transport.TFramedTransport in project storm by apache.
the class SimpleTransportPlugin method connect.
/**
* Connect to the specified server via framed transport.
*
* @param transport The underlying Thrift transport
* @param serverHost unused
* @param asUser unused
*/
@Override
public TTransport connect(TTransport transport, String serverHost, String asUser) throws TTransportException {
int maxBufferSize = type.getMaxBufferSize(topoConf);
// create a framed transport
TTransport conn = new TFramedTransport(transport, maxBufferSize);
// connect
conn.open();
LOG.debug("Simple client transport has been established");
return conn;
}
Aggregations