Esempio n. 1
0
        public static AddressManager NewDiscoveryAddressManager(string clientId, ArtemisClientManagerConfig managerConfig)
        {
            AddressRepository addressRepository = new AddressRepository(clientId, managerConfig, RestPaths.CLUSTER_UP_DISCOVERY_NODES_FULL_PATH);

            return(new AddressManager(clientId, managerConfig,
                                      () => {
                return new AddressContext(clientId, managerConfig, addressRepository.Address, WebSocketPaths.SERVICE_CHANGE_DESTINATION);
            }));
        }
Esempio n. 2
0
        public static AddressManager NewRegistryAddressManager(string clientId, ArtemisClientManagerConfig managerConfig)
        {
            AddressRepository addressRepository = new AddressRepository(clientId, managerConfig, RestPaths.CLUSTER_UP_REGISTRY_NODES_FULL_PATH);

            return(new AddressManager(clientId, managerConfig,
                                      () =>
            {
                return new AddressContext(clientId, managerConfig, addressRepository.Address, WebSocketPaths.HEARTBEAT_DESTINATION);
            }));
        }
        public void TestAddress()
        {
            AddressRepository addressRepository = new AddressRepository(Constants.ClientId, Constants.ManagerConfig, RestPaths.CLUSTER_UP_DISCOVERY_NODES_FULL_PATH);
            string            address           = addressRepository.Address;

            while (address == null)
            {
                address = addressRepository.Address;
                Threads.Sleep(100);
            }
            Assert.IsNotNull(address);
        }