DOFRuntimeServerStateListener InterfaceOpenDOF Object Access Library
The ServerStateListener interface, when implemented, enables you to receive notifications when any of the DOF's servers start or stop.

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

C#
public interface ServerStateListener

The DOFRuntimeServerStateListener type exposes the following members.

Methods

  NameDescription
Public methodremoved
Called when this listener is removed from the DOF.Runtime, either through use of Runtime.removeServerListener(ServerStateListener) or because an exception caused the listener to be removed. Use this method to free any resources allocated in association with this listener. After this method is called, the listener will no longer be called.

You may leave this method empty to ignore notification of removal.

Public methodstateChanged
Called whenever the State.isStarted() value changes for any of the DOF's servers. This method is called immediately for all servers when the listener is added, and then will be called whenever a server's started state changes. For each server, the library guarantees that calls to this method will occur in the same order as the associated state change, so that, for example, if a server rapidly starts and then stops, you won't mistakenly receive the stop notification before the start notification.
Top
Remarks

The ServerStateListener interface, when implemented, enables you to receive notifications when any of the DOF's servers start or stop.

Methods in this interface may be called by multiple threads simultaneously. You must manage thread-safety.

See Also

Reference

StateListener