public NeighborsMessageSerializer(
     IEcdsa ecdsa,
     IPrivateKeyGenerator privateKeyGenerator,
     IDiscoveryMessageFactory messageFactory,
     INodeIdResolver nodeIdResolver) : base(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver)
 {
 }
 public NeighborsMessageSerializer(
     ISigner signer,
     IPrivateKeyProvider privateKeyProvider,
     IDiscoveryMessageFactory messageFactory,
     INodeIdResolver nodeIdResolver,
     INodeFactory nodeFactory) : base(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory)
 {
 }
 protected DiscoveryMessageSerializerBase(ISigner signer, IPrivateKeyProvider privateKeyProvider, IDiscoveryMessageFactory messageFactory, INodeIdResolver nodeIdResolver, INodeFactory nodeFactory)
 {
     _signer        = signer;
     _privateKey    = privateKeyProvider.PrivateKey;
     MessageFactory = messageFactory;
     NodeIdResolver = nodeIdResolver;
     NodeFactory    = nodeFactory;
 }
Exemple #4
0
 public NodeLifecycleManagerFactory(INodeTable nodeTable, IDiscoveryMessageFactory discoveryMessageFactory, IEvictionManager evictionManager, INodeStatsManager nodeStatsManager, IDiscoveryConfig discoveryConfig, ILogManager logManager)
 {
     _logger                  = logManager?.GetClassLogger() ?? throw new ArgumentNullException(nameof(logManager));
     _nodeTable               = nodeTable ?? throw new ArgumentNullException(nameof(nodeTable));
     _discoveryConfig         = discoveryConfig ?? throw new ArgumentNullException(nameof(discoveryConfig));
     _discoveryMessageFactory = discoveryMessageFactory ?? throw new ArgumentNullException(nameof(discoveryMessageFactory));
     _evictionManager         = evictionManager ?? throw new ArgumentNullException(nameof(evictionManager));
     _nodeStatsManager        = nodeStatsManager ?? throw new ArgumentNullException(nameof(nodeStatsManager));
 }
 public NodeLifecycleManagerFactory(INodeFactory nodeFactory, INodeTable nodeTable, ILogger logger, IDiscoveryConfigurationProvider discoveryConfigurationProvider, IDiscoveryMessageFactory discoveryMessageFactory, IEvictionManager evictionManager, INodeStatsProvider nodeStatsProvider)
 {
     _nodeFactory = nodeFactory;
     _nodeTable   = nodeTable;
     _logger      = logger;
     _discoveryConfigurationProvider = discoveryConfigurationProvider;
     _discoveryMessageFactory        = discoveryMessageFactory;
     _evictionManager   = evictionManager;
     _nodeStatsProvider = nodeStatsProvider;
 }
Exemple #6
0
 protected DiscoveryMessageSerializerBase(
     IEcdsa ecdsa,
     IPrivateKeyGenerator privateKeyGenerator,
     IDiscoveryMessageFactory messageFactory,
     INodeIdResolver nodeIdResolver)
 {
     _ecdsa          = ecdsa ?? throw new ArgumentNullException(nameof(ecdsa));
     _privateKey     = privateKeyGenerator.Generate();
     _messageFactory = messageFactory ?? throw new ArgumentNullException(nameof(messageFactory));
     _nodeIdResolver = nodeIdResolver ?? throw new ArgumentNullException(nameof(nodeIdResolver));
 }
Exemple #7
0
 protected DiscoveryMessageSerializerBase(
     ISigner signer,
     IPrivateKeyGenerator privateKeyGenerator,
     IDiscoveryMessageFactory messageFactory,
     INodeIdResolver nodeIdResolver)
 {
     _signer        = signer ?? throw new ArgumentNullException(nameof(signer));
     _privateKey    = privateKeyGenerator.Generate() ?? throw new ArgumentNullException(nameof(_privateKey));
     MessageFactory = messageFactory ?? throw new ArgumentNullException(nameof(messageFactory));
     NodeIdResolver = nodeIdResolver ?? throw new ArgumentNullException(nameof(nodeIdResolver));
 }
 public NodeLifecycleManager(Node node, IDiscoveryManager discoveryManager, INodeTable nodeTable, IDiscoveryMessageFactory discoveryMessageFactory, IEvictionManager evictionManager, INodeStats nodeStats, IDiscoveryConfig discoveryConfig, ILogger logger)
 {
     _discoveryManager        = discoveryManager;
     _nodeTable               = nodeTable;
     _logger                  = logger;
     _discoveryConfig         = discoveryConfig;
     _discoveryMessageFactory = discoveryMessageFactory;
     _evictionManager         = evictionManager;
     NodeStats                = nodeStats;
     ManagedNode              = node;
     UpdateState(NodeLifecycleState.New);
 }
 public NodeLifecycleManager(Node node, IDiscoveryManager discoveryManager, INodeTable nodeTable, ILogger logger, IConfigProvider configurationProvider, IDiscoveryMessageFactory discoveryMessageFactory, IEvictionManager evictionManager, INodeStats nodeStats)
 {
     _discoveryManager        = discoveryManager;
     _nodeTable               = nodeTable;
     _logger                  = logger;
     _configurationProvider   = configurationProvider.GetConfig <NetworkConfig>();
     _discoveryMessageFactory = discoveryMessageFactory;
     _evictionManager         = evictionManager;
     NodeStats                = nodeStats;
     ManagedNode              = node;
     UpdateState(NodeLifecycleState.New);
 }
        public DiscoveryMsgSerializersProvider(
            IMessageSerializationService messageSerializationService,
            IEcdsa ecdsa,
            IPrivateKeyGenerator privateKeyGenerator,
            IDiscoveryMessageFactory messageFactory,
            INodeIdResolver nodeIdResolver)
        {
            PingMessageSerializer      pingSerializer      = new PingMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver);
            PongMessageSerializer      pongSerializer      = new PongMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver);
            FindNodeMessageSerializer  findNodeSerializer  = new FindNodeMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver);
            NeighborsMessageSerializer neighborsSerializer = new NeighborsMessageSerializer(ecdsa, privateKeyGenerator, messageFactory, nodeIdResolver);

            _messageSerializationService = messageSerializationService;
            _pingMessageSerializer       = pingSerializer;
            _pongMessageSerializer       = pongSerializer;
            _findNodeMessageSerializer   = findNodeSerializer;
            _neighborsMessageSerializer  = neighborsSerializer;
        }
Exemple #11
0
        public DiscoveryMsgSerializersProvider(
            IMessageSerializationService messageSerializationService,
            ISigner signer,
            IPrivateKeyProvider privateKeyProvider,
            IDiscoveryMessageFactory messageFactory,
            INodeIdResolver nodeIdResolver,
            INodeFactory nodeFactory)
        {
            var pingSerializer      = new PingMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory);
            var pongSerializer      = new PongMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory);
            var findNodeSerializer  = new FindNodeMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory);
            var neighborsSerializer = new NeighborsMessageSerializer(signer, privateKeyProvider, messageFactory, nodeIdResolver, nodeFactory);

            _messageSerializationService = messageSerializationService;
            _pingMessageSerializer       = pingSerializer;
            _pongMessageSerializer       = pongSerializer;
            _findNodeMessageSerializer   = findNodeSerializer;
            _neighborsMessageSerializer  = neighborsSerializer;
        }
Exemple #12
0
 public PingMessageSerializer(ISigner signer, IPrivateKeyGenerator privateKeyGenerator, IDiscoveryMessageFactory messageFactory, INodeIdResolver nodeIdResolver, INodeFactory nodeFactory) : base(signer, privateKeyGenerator, messageFactory, nodeIdResolver, nodeFactory)
 {
 }