本文整理汇总了Java中org.ethereum.net.eth.handler.EthHandlerFactory类的典型用法代码示例。如果您正苦于以下问题:Java EthHandlerFactory类的具体用法?Java EthHandlerFactory怎么用?Java EthHandlerFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EthHandlerFactory类属于org.ethereum.net.eth.handler包,在下文中一共展示了EthHandlerFactory类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChannelFactory
import org.ethereum.net.eth.handler.EthHandlerFactory; //导入依赖的package包/类
@Bean
public EthereumChannelInitializer.ChannelFactory getChannelFactory(RskSystemProperties config,
EthereumListener ethereumListener,
ConfigCapabilities configCapabilities,
NodeManager nodeManager,
EthHandlerFactory ethHandlerFactory,
StaticMessages staticMessages,
PeerScoringManager peerScoringManager) {
return () -> {
HandshakeHandler handshakeHandler = new HandshakeHandler(config, peerScoringManager);
MessageQueue messageQueue = new MessageQueue();
P2pHandler p2pHandler = new P2pHandler(config, ethereumListener, configCapabilities);
MessageCodec messageCodec = new MessageCodec(ethereumListener, config);
return new Channel(config, messageQueue, p2pHandler, messageCodec, handshakeHandler, nodeManager, ethHandlerFactory, staticMessages);
};
}
示例2: Channel
import org.ethereum.net.eth.handler.EthHandlerFactory; //导入依赖的package包/类
public Channel(RskSystemProperties config,
MessageQueue msgQueue,
P2pHandler p2pHandler,
MessageCodec messageCodec,
HandshakeHandler handshakeHandler,
NodeManager nodeManager,
EthHandlerFactory ethHandlerFactory,
StaticMessages staticMessages) {
this.config = config;
this.msgQueue = msgQueue;
this.p2pHandler = p2pHandler;
this.messageCodec = messageCodec;
this.handshakeHandler = handshakeHandler;
this.nodeManager = nodeManager;
this.ethHandlerFactory = ethHandlerFactory;
this.staticMessages = staticMessages;
}