public PublisherLogic(string name, string pmLogServerUrl)
 {
     this.sequenceNumber = 0;
     this.name           = name;
     pool      = new CommonTypes.ThreadPool(10);
     logServer = Activator.GetObject(typeof(IPuppetMasterLog), pmLogServerUrl)
                 as IPuppetMasterLog;
 }
 public PublisherLogic(string name, string pmLogServerUrl)
 {
     this.sequenceNumber = 0;
     this.name = name;
     pool = new CommonTypes.ThreadPool(10);
     logServer = Activator.GetObject(typeof(IPuppetMasterLog), pmLogServerUrl)
         as IPuppetMasterLog;
 }
 public SubscriberLogic(ISubscriber myProxy,string orderingPolicy, string name,
     string pmLogServerUrl, string loggingLevel)
 {
     pool = new CommonTypes.ThreadPool(1);
     this.myProxy = myProxy;
     this.name = name;
     this.loggingLevel = loggingLevel;
     this.ordering = orderingPolicy;
     this.freezer = new List<Event>();
     if (orderingPolicy.Equals("FIFO"))
     {
         this.repeated = new DetectRepeatedFIFO();
     }
     else if (orderingPolicy.Equals("NO") || orderingPolicy.Equals("TOTAL"))
     {
         this.repeated = new DetectRepeatedMessageNO();
     }
     logServer = Activator.GetObject(typeof(IPuppetMasterLog), pmLogServerUrl)
         as IPuppetMasterLog;
 }
 public SubscriberLogic(ISubscriber myProxy, string orderingPolicy, string name,
                        string pmLogServerUrl, string loggingLevel)
 {
     pool              = new CommonTypes.ThreadPool(1);
     this.myProxy      = myProxy;
     this.name         = name;
     this.loggingLevel = loggingLevel;
     this.ordering     = orderingPolicy;
     this.freezer      = new List <Event>();
     if (orderingPolicy.Equals("FIFO"))
     {
         this.repeated = new DetectRepeatedFIFO();
     }
     else if (orderingPolicy.Equals("NO") || orderingPolicy.Equals("TOTAL"))
     {
         this.repeated = new DetectRepeatedMessageNO();
     }
     logServer = Activator.GetObject(typeof(IPuppetMasterLog), pmLogServerUrl)
                 as IPuppetMasterLog;
 }
Beispiel #5
0
        public BrokerLogic(IBroker myProxy, string name, string orderingPolicy, string routingPolicy,
                           string loggingLevel, string pmLogServerUrl)
        {
            this.remoteProxy    = myProxy;
            this.brokerName     = name;
            this.pmLogServerUrl = pmLogServerUrl;
            this.orderingPolicy = orderingPolicy;
            this.loggingLevel   = loggingLevel;
            this.routingPolicy  = routingPolicy;
            if (routingPolicy.Equals("filter"))
            {
                this.router = new Filtered(this);
            }
            else if (routingPolicy.Equals("flooding"))
            {
                this.router = new Flooding(this);
            }
            if (orderingPolicy.Equals("FIFO"))
            {
                this.order = new FifoOrdering();
            }
            else if (orderingPolicy.Equals("NO"))
            {
                this.order = new NoOrdering();
            }
            else if (orderingPolicy.Equals("TOTAL"))
            {
                this.order = new TotalOrdering(this);
            }

            if (orderingPolicy.Equals("TOTAL"))
            {
                this.pool = new CommonTypes.ThreadPool(1);
            }
            else
            {
                this.pool = new CommonTypes.ThreadPool(10);
            }
            this.topicSubscribers = new TopicSubscriberCollection();
            childSites            = new Dictionary <string, IBroker>();
        }
Beispiel #6
0
        public BrokerLogic(IBroker myProxy,string name, string orderingPolicy, string routingPolicy,
            string loggingLevel, string pmLogServerUrl)
        {
            this.remoteProxy = myProxy;
            this.brokerName = name;
            this.pmLogServerUrl = pmLogServerUrl;
            this.orderingPolicy = orderingPolicy;
            this.loggingLevel = loggingLevel;
            this.routingPolicy = routingPolicy;
            if (routingPolicy.Equals("filter"))
            {
                this.router = new Filtered(this);
            }
            else if (routingPolicy.Equals("flooding"))
            {
                this.router = new Flooding(this);
            }
            if (orderingPolicy.Equals("FIFO"))
            {
                this.order = new FifoOrdering();
            }
            else if (orderingPolicy.Equals("NO"))
            {
                this.order = new NoOrdering();
            }
            else if (orderingPolicy.Equals("TOTAL"))
            {
                this.order = new TotalOrdering(this);
            }

            if (orderingPolicy.Equals("TOTAL"))
            {
                this.pool = new CommonTypes.ThreadPool(1);
            }
            else
            {
                this.pool = new CommonTypes.ThreadPool(10);
            }
            this.topicSubscribers = new TopicSubscriberCollection();
            childSites = new Dictionary<string, IBroker>();
        }