Package com.alibaba.rocketmq.research.rpc

Examples of com.alibaba.rocketmq.research.rpc.DefaultRPCClient.connect()


* @author shijia.wxr<vintage.wang@gmail.com>
*/
public class Client {
    public static void main(String[] args) {
        RPCClient rpcClient = new DefaultRPCClient();
        boolean connectOK = rpcClient.connect(new InetSocketAddress("127.0.0.1", 2012), 1);
        System.out.println("connect server " + (connectOK ? "OK" : "Failed"));
        rpcClient.start();

        for (long i = 0;; i++) {
            try {
View Full Code Here


        final ThreadPoolExecutor executorSend = (ThreadPoolExecutor) Executors.newFixedThreadPool(threadCnt);

        // rpcclient
        final RPCClient rpcClient = new DefaultRPCClient();
        final boolean connectOK =
                rpcClient.connect(new InetSocketAddress(remoteHost, remotePort), connectionCnt);
        System.out.println("connect server " + remoteHost + (connectOK ? " OK" : " Failed"));
        rpcClient.start();

        // status
        final byte[] message = buildMessage(messageSize);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.