/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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"); }
/// <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"); }
/// <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"); }
/// <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"); }
/// <summary>Called when information on a node is updated</summary> /// <param name="jobEvent">encapsulates the topology event</param> public virtual void NodeUpdated(TopologyEvent topologyEvent) { }
/// <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) { }
/// <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) { }
/// <summary>Called when information on a driver is updated</summary> /// <param name="jobEvent">encapsulates the topology event</param> public virtual void DriverUpdated(TopologyEvent topologyEvent) { }
/// <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) { }
/// <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) { }