当前位置: 首页>>代码示例>>Java>>正文


Java NettyRemotingClient类代码示例

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


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

示例1: MQClientAPIImpl

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public MQClientAPIImpl(final NettyClientConfig nettyClientConfig, final ClientRemotingProcessor clientRemotingProcessor,
    RPCHook rpcHook, final ClientConfig clientConfig) {
    this.clientConfig = clientConfig;
    topAddressing = new TopAddressing(MixAll.getWSAddr(), clientConfig.getUnitName());
    this.remotingClient = new NettyRemotingClient(nettyClientConfig, null);
    this.clientRemotingProcessor = clientRemotingProcessor;

    this.remotingClient.registerRPCHook(rpcHook); 
    this.remotingClient.registerProcessor(RequestCode.CHECK_TRANSACTION_STATE, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.NOTIFY_CONSUMER_IDS_CHANGED, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.RESET_CONSUMER_CLIENT_OFFSET, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.GET_CONSUMER_STATUS_FROM_CLIENT, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.GET_CONSUMER_RUNNING_INFO, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.CONSUME_MESSAGE_DIRECTLY, this.clientRemotingProcessor, null);
}
 
开发者ID:lirenzuo,项目名称:rocketmq-rocketmq-all-4.1.0-incubating,代码行数:21,代码来源:MQClientAPIImpl.java

示例2: MQClientAPIImpl

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public MQClientAPIImpl(final NettyClientConfig nettyClientConfig, final ClientRemotingProcessor clientRemotingProcessor,
    RPCHook rpcHook, final ClientConfig clientConfig) {
    this.clientConfig = clientConfig;
    topAddressing = new TopAddressing(MixAll.WS_ADDR, clientConfig.getUnitName());
    this.remotingClient = new NettyRemotingClient(nettyClientConfig, null);
    this.clientRemotingProcessor = clientRemotingProcessor;

    this.remotingClient.registerRPCHook(rpcHook);
    this.remotingClient.registerProcessor(RequestCode.CHECK_TRANSACTION_STATE, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.NOTIFY_CONSUMER_IDS_CHANGED, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.RESET_CONSUMER_CLIENT_OFFSET, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.GET_CONSUMER_STATUS_FROM_CLIENT, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.GET_CONSUMER_RUNNING_INFO, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.CONSUME_MESSAGE_DIRECTLY, this.clientRemotingProcessor, null);
}
 
开发者ID:lyy4j,项目名称:rmq4note,代码行数:21,代码来源:MQClientAPIImpl.java

示例3: MQClientAPIImpl

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public MQClientAPIImpl(final NettyClientConfig nettyClientConfig,
    final ClientRemotingProcessor clientRemotingProcessor,
    RPCHook rpcHook, final ClientConfig clientConfig) {
    this.clientConfig = clientConfig;
    topAddressing = new TopAddressing(MixAll.getWSAddr(), clientConfig.getUnitName());
    this.remotingClient = new NettyRemotingClient(nettyClientConfig, null);
    this.clientRemotingProcessor = clientRemotingProcessor;

    this.remotingClient.registerRPCHook(rpcHook);
    this.remotingClient.registerProcessor(RequestCode.CHECK_TRANSACTION_STATE, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.NOTIFY_CONSUMER_IDS_CHANGED, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.RESET_CONSUMER_CLIENT_OFFSET, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.GET_CONSUMER_STATUS_FROM_CLIENT, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.GET_CONSUMER_RUNNING_INFO, this.clientRemotingProcessor, null);

    this.remotingClient.registerProcessor(RequestCode.CONSUME_MESSAGE_DIRECTLY, this.clientRemotingProcessor, null);
}
 
开发者ID:apache,项目名称:rocketmq,代码行数:22,代码来源:MQClientAPIImpl.java

示例4: testSetCallbackExecutor

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
@Test
public void testSetCallbackExecutor() throws MQClientException {
    String producerGroupTemp = producerGroupPrefix + System.currentTimeMillis();
    producer = new DefaultMQProducer(producerGroupTemp);
    producer.setNamesrvAddr("127.0.0.1:9876");
    producer.start();

    ExecutorService customized = Executors.newCachedThreadPool();
    producer.setCallbackExecutor(customized);

    NettyRemotingClient remotingClient = (NettyRemotingClient) producer.getDefaultMQProducerImpl()
        .getmQClientFactory().getMQClientAPIImpl().getRemotingClient();

    assertThat(remotingClient.getCallbackExecutor()).isEqualTo(customized);
}
 
开发者ID:apache,项目名称:rocketmq,代码行数:16,代码来源:DefaultMQProducerTest.java

示例5: createRemotingClient

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public static RemotingClient createRemotingClient() {
    NettyClientConfig config = new NettyClientConfig();
    RemotingClient client = new NettyRemotingClient(config);
    client.start();
    return client;
}
 
开发者ID:lirenzuo,项目名称:rocketmq-rocketmq-all-4.1.0-incubating,代码行数:7,代码来源:RemotingServerTest.java

示例6: FilterServerOuterAPI

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public FilterServerOuterAPI() {
    this.remotingClient = new NettyRemotingClient(new NettyClientConfig());
}
 
开发者ID:lirenzuo,项目名称:rocketmq-rocketmq-all-4.1.0-incubating,代码行数:4,代码来源:FilterServerOuterAPI.java

示例7: BrokerOuterAPI

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public BrokerOuterAPI(final NettyClientConfig nettyClientConfig, RPCHook rpcHook) {
    this.remotingClient = new NettyRemotingClient(nettyClientConfig);
    this.remotingClient.registerRPCHook(rpcHook);
}
 
开发者ID:lirenzuo,项目名称:rocketmq-rocketmq-all-4.1.0-incubating,代码行数:5,代码来源:BrokerOuterAPI.java

示例8: createRemotingClient

import org.apache.rocketmq.remoting.netty.NettyRemotingClient; //导入依赖的package包/类
public static RemotingClient createRemotingClient(NettyClientConfig nettyClientConfig) {
    RemotingClient client = new NettyRemotingClient(nettyClientConfig);
    client.start();
    return client;
}
 
开发者ID:apache,项目名称:rocketmq,代码行数:6,代码来源:RemotingServerTest.java


注:本文中的org.apache.rocketmq.remoting.netty.NettyRemotingClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。