public void RegisterBrokers(List <string> addresses) { // Subscriber doesn't need to know the broker's name BrokerCircle brokerCircle = new BrokerCircle(""); int id = 0; foreach (string address in addresses) { brokerCircle.AddBroker((IBroker)Activator.GetObject(typeof(IBroker), address), id); id++; } Subscriber.brokerCircle = brokerCircle; }
// Puppet Master public void RegisterChildReplication(List <string> addresses, string name) { BrokerCircle brokerCircle = new BrokerCircle(name); int id = 0; foreach (string address in addresses) { brokerCircle.AddBroker((IBroker)Activator.GetObject(typeof(IBroker), address), id); id++; } // Add circle to a list of neighbour circles Broker.neighbourBrokers.Add(brokerCircle); }
// Puppet Master public void RegisterChildReplication( List<string> addresses, string name ) { BrokerCircle brokerCircle = new BrokerCircle( name ); int id = 0; foreach ( string address in addresses ) { brokerCircle.AddBroker( (IBroker)Activator.GetObject( typeof( IBroker ), address ), id ); id++; } // Add circle to a list of neighbour circles Broker.neighbourBrokers.Add( brokerCircle ); }
public void RegisterBrokers( List<string> addresses ) { // Subscriber doesn't need to know the broker's name BrokerCircle brokerCircle = new BrokerCircle( "" ); int id = 0; foreach ( string address in addresses ) { brokerCircle.AddBroker( (IBroker)Activator.GetObject( typeof( IBroker ), address ), id ); id++; } Subscriber.brokerCircle = brokerCircle; }