DOFsetNodeDown Method OpenDOF Object Access Library
Notifies the network that the DOF calling this method is about to be destroyed.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public void setNodeDown()
Remarks

Notifies the network that the DOF calling this method is about to be destroyed. It is beneficial for network efficiency to notify other nodes before destroying a DOF, because it prevents state associated with the DOF's operations on other nodes from entering a source-lost state, thereby preventing network communication related to attempts to recover the lost resources. This method should be called only before destroying components and using the destroy() method. Continuing to send DOF operations to the rest of the network after sending a setNodeDown call will cause your DOF's state to be out of synch with other nodes and may result in unpredictable behavior.

The DOF.destroy method effectively also calls the setNodeDown method. You do not need to call setNodeDown before DOF.destroy unless you manually destroy connections and servers (using DOFConnection.destroy() and DOFServer.destroy() ) immediately before calling the DOF.destroy method (in other words, you destroy connectivity before calling DOF.destroy). It is unusual to need to manually destroy connections and servers at program termination (the DOF.destroy method also destroys these objects); however, if you are doing so, calling setNodeDown first is recommended.

You should not use the setNodeDown method before destroying connections and servers unless you intend to also destroy the DOF. The setNodeDown method does not replace DOF.destroy. You must still call DOF.destroy after calling setNodeDown.

The setNodeDown method does not operate as a way to stop the DOF temporarily. The DOF cannot be restarted after making this call.

See Also

Reference