示例#1
0
        /// <summary>Print a console message describing a topology event notification</summary>
        /// <param name="topologyEvent">the received event</param>
        /// <param name="prefix">a string describing the type of event</param>
        private void WriteEvent(TopologyEvent topologyEvent, string prefix)
        {
            string s1 = JPPFDotnetDemo.GetName(topologyEvent.getDriver());
            string s2 = JPPFDotnetDemo.GetName(topologyEvent.getNodeOrPeer());

            Console.WriteLine("[.Net TopologyManager] " + prefix + " for driver=" + s1 + " and node=" + s2);
        }
示例#2
0
        /// <summary>Node updated notification</summary>
        /// <param name="jobEvent">encapsulates information about the event and related topology components</param>
        public virtual void NodeUpdated(java.lang.Object topologyEvent)
        {
            TopologyEvent e = topologyEvent as TopologyEvent;

            if (verbose)
            {
                WriteEvent(e, "node updated");
            }
            listener.NodeUpdated(e);
        }
示例#3
0
        /// <summary>Driver added notification</summary>
        /// <param name="jobEvent">encapsulates information about the event and related topology components</param>
        public virtual void DriverAdded(java.lang.Object topologyEvent)
        {
            TopologyEvent e = topologyEvent as TopologyEvent;

            if (verbose)
            {
                WriteEvent(e, "driver added");
            }
            listener.DriverAdded(e);
        }
示例#4
0
        /// <summary>Print a console message describing a received event notification</summary>
        /// <param name="topologyEvent">the received event</param>
        /// <param name="type">a string describing the type of event notification</param>
        private void WriteEvent(TopologyEvent topologyEvent, string type)
        {
            TopologyDriver driver = topologyEvent.getDriver();
            string         s1     = "none";

            if (driver != null)
            {
                s1 = driver.getDisplayName();
            }
            TopologyNode node = topologyEvent.getNodeOrPeer();
            string       s2   = "none";

            if (node != null)
            {
                s2 = node.getDisplayName();
            }
            Console.WriteLine("[.Net] dispatcher: topology event '" + type + "' for driver=" + s1 + " and node=" + s2);
        }
示例#5
0
 /// <summary>Called when a node is removed from the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public override void NodeRemoved(TopologyEvent topologyEvent)
 {
     WriteEvent(topologyEvent, "node removed");
 }
示例#6
0
 /// <summary>Called when a new node is added to the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public override void NodeAdded(TopologyEvent topologyEvent)
 {
     WriteEvent(topologyEvent, "node added");
 }
示例#7
0
 /// <summary>Called when a driver is removed from the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public override void DriverRemoved(TopologyEvent topologyEvent)
 {
     WriteEvent(topologyEvent, "driver removed");
 }
示例#8
0
 /// <summary>Called when a new driver is added to the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public override void DriverAdded(TopologyEvent topologyEvent)
 {
     WriteEvent(topologyEvent, "driver added");
 }
示例#9
0
 /// <summary>Called when information on a node is updated</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public virtual void NodeUpdated(TopologyEvent topologyEvent)
 {
 }
示例#10
0
 /// <summary>Called when a node is removed from the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public virtual void NodeRemoved(TopologyEvent topologyEvent)
 {
 }
示例#11
0
 /// <summary>Called when a new node is added to the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public virtual void NodeAdded(TopologyEvent topologyEvent)
 {
 }
示例#12
0
 /// <summary>Called when information on a driver is updated</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public virtual void DriverUpdated(TopologyEvent topologyEvent)
 {
 }
示例#13
0
 /// <summary>Called when a driver is removed from the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public virtual void DriverRemoved(TopologyEvent topologyEvent)
 {
 }
示例#14
0
 /// <summary>Called when a new driver is added to the grid</summary>
 /// <param name="jobEvent">encapsulates the topology event</param>
 public virtual void DriverAdded(TopologyEvent topologyEvent)
 {
 }