• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java TFramedTransport类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.apache.thrift7.transport.TFramedTransport的典型用法代码示例。如果您正苦于以下问题:Java TFramedTransport类的具体用法?Java TFramedTransport怎么用?Java TFramedTransport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

TFramedTransport类属于org.apache.thrift7.transport包,在下文中一共展示了TFramedTransport类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: nimbusClientandConn

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
public static List nimbusClientandConn(String host, Integer port)
		throws TTransportException {
	TSocket ts = new TSocket(host, port);
	TFramedTransport tt = new TFramedTransport(ts);
	TBinaryProtocol prot = new TBinaryProtocol(tt);
	Client nc = new Client(prot);
	ts.open();
	List l = new ArrayList();
	l.add(nc);
	l.add(tt);
	return l;
}
 

开发者ID:zhangjunfang,
项目名称:jstorm-0.9.6.3-,
代码行数:13,
代码来源:UIUtils.java

示例2: connect

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
/**
 * Connect to the specified server via framed transport
 * 
 * @param transport
 *            The underlying Thrift transport.
 */
@Override
public TTransport connect(TTransport transport, String serverHost)
		throws TTransportException {
	// create a framed transport
	TTransport conn = new TFramedTransport(transport);

	// connect
	conn.open();
	LOG.debug("Simple client transport has been established");

	return conn;
}
 

开发者ID:zhangjunfang,
项目名称:jstorm-0.9.6.3-,
代码行数:19,
代码来源:SimpleTransportPlugin.java

示例3: connect

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
private void connect() throws TException {
	TSocket socket = new TSocket(host, port);
	if (timeout != null) {
		socket.setTimeout(timeout);
	}
	conn = new TFramedTransport(socket);
	client = new DistributedRPC.Client(new TBinaryProtocol(conn));
	conn.open();
}
 

开发者ID:zhangjunfang,
项目名称:jstorm-0.9.6.3-,
代码行数:10,
代码来源:DRPCClient.java

示例4: connect

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
/**
 * Connect to the specified server via framed transport 
 * @param transport The underlying Thrift transport.
 */
public TTransport connect(TTransport transport, String serverHost) throws TTransportException {
    //create a framed transport
    TTransport conn = new TFramedTransport(transport);

    //connect
    conn.open();
    LOG.debug("Simple client transport has been established");

    return conn;
}
 

开发者ID:zhangjunfang,
项目名称:jstorm-0.9.6.3-,
代码行数:15,
代码来源:SimpleTransportPlugin.java

示例5: connect

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
/**
 * Connect to the specified server via framed transport
 * 
 * @param transport
 *            The underlying Thrift transport.
 */
public TTransport connect(TTransport transport, String serverHost)
		throws TTransportException {
	// create a framed transport
	TTransport conn = new TFramedTransport(transport);

	// connect
	conn.open();
	LOG.debug("Simple client transport has been established");

	return conn;
}
 

开发者ID:songtk,
项目名称:learn_jstorm,
代码行数:18,
代码来源:SimpleTransportPlugin.java

示例6: ThriftConnection

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
/**
 * Creates a connection with explicit nimbus host. Ignored if a local cluster is set 
 * for testing.
 * 
 * @param nimbusHost the nimbus host name
 * @param port the nimbus port number
 * @see #setLocalCluster(ILocalCluster)
 */
public ThriftConnection(String nimbusHost, int port) {
    if (null == localCluster) {
        socket = new TSocket(nimbusHost, port);
        LOGGER.info("Thrift connection info " + nimbusHost + " " + port);
        transport = new TFramedTransport(socket);
        protocol = new TBinaryProtocol(transport);
        client = new Client(protocol);
    }
}
 

开发者ID:QualiMaster,
项目名称:Infrastructure,
代码行数:18,
代码来源:ThriftConnection.java

示例7: KestrelThriftClient

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
public KestrelThriftClient(String hostname, int port)
		throws TException
{

	_transport = new TFramedTransport(new TSocket(hostname, port));
	final TProtocol proto = new TBinaryProtocol(_transport);
	_client = new Kestrel.Client(proto);
	_transport.open();
}
 

开发者ID:openimaj,
项目名称:openimaj,
代码行数:10,
代码来源:KestrelThriftClient.java

示例8: connect

点赞 2

import org.apache.thrift7.transport.TFramedTransport; //导入依赖的package包/类
private void connect() throws TException {
	conn = new TFramedTransport(new TSocket(host, port));
	client = new DistributedRPCInvocations.Client(new TBinaryProtocol(conn));
	conn.open();
}
 

开发者ID:zhangjunfang,
项目名称:jstorm-0.9.6.3-,
代码行数:6,
代码来源:DRPCInvocationsClient.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)