AP&C API Reference
Public Member Functions | Properties | Events | List of all members
Apac.Supervisors.ISupervisor Interface Reference

Defines the contract supported by all supervisor components. More...

Inheritance diagram for Apac.Supervisors.ISupervisor:
Apac.ISupervisable Apac.Supervisors.Supervisor Apac.Supervisors.ControllerSupervisor Apac.Supervisors.DataSupervisor Apac.Supervisors.ExecutiveSupervisor

Public Member Functions

void Initialize (Apac.Configuration.ConfigElement config)
 
ISupervisable LocateSupervisableAgent (string name)
 Should locate a supervisable agent with the given type and name. At the supervisor's option it can request its controlling supervisor search as well. More...
 
ISupervisable[] LocateSupervisableAgents (Predicate< ISupervisable > predicate, bool askExec)
 
void AddSubordinate (ISupervisable subordinate)
 
void RemoveSubordinate (string name)
 
SupervisableDescription[] ListSubordinates ()
 
Licensing.AcquisitionResponse RequestLocks (Licensing.LicensedFeatures features)
 
Licensing.ReleaseResponse ReleaseLock (string acquisitionId)
 
SupervisableState GetSubordinateState (string name)
 
void StartSubordinate (string name)
 
void StopSubordinate (string name)
 
- Public Member Functions inherited from Apac.ISupervisable
void Initialize (Apac.Configuration.SupervisableConfig config, Supervisors.ISupervisor exec)
 Initializes the component with the given SupervisableConfig (or derivative) and ISupervisor. More...
 
void ResolveReferences ()
 Resolves any references this component might hold to other supervisable components. More...
 
void CheckReferencesStates ()
 Checks the states of referenced components to be sure they are satisfactory for this component's operation. More...
 
void Starting ()
 Signals that Start() will soon be called on the component. This can be used as an opportunity to perform preparatory activity, like checking the state of referenced components and similar actions. More...
 
void Start ()
 Starts the component. More...
 
void Stop ()
 Stops the component. More...
 

Properties

SupervisableCollection Subordinates [get]
 
- Properties inherited from Apac.ISupervisable
string Name [get]
 The name of the component, for unique identification purposes. More...
 
string Description [get]
 The description of the component, for human consumption. More...
 
bool Prioritized [get]
 Indicates if the component should be high priority. More...
 
Supervisors.ISupervisor ExecutiveSupervisor [get]
 Walks the tree to find the top level supervisor. More...
 
bool IsRunning [get]
 Indicates that the component is running. More...
 
DateTime LastHeartbeat [get]
 
DateTime StartTime [get]
 Gets the time this supervisable component was started. More...
 
DateTime StopTime [get]
 Gets the time this supervisable component was stopped. More...
 
TimeSpan UpTime [get]
 Gets the amount of time this supervisable component has been running, or did run before it was stopped (if IsRunning is false). More...
 
SupervisableState CurrentState [get]
 Gets the current SupervisableState of this component. More...
 
SupervisableState PreviousState [get]
 Gets the previous SupervisableState of this component. More...
 
Exception LastException [get]
 Gets the last exception to have occurred and been trapped by this component. More...
 

Events

SupervisableStateChangingHandler SubordinateStateChanging
 
SupervisableStateChangedHandler SubordinateStateChanged
 
SupervisableErroredHandler SubordinateErrored
 
SupervisableHeartbeatHandler SubordinateHeartbeat
 
- Events inherited from Apac.ISupervisable
SupervisableStateChangingHandler SupervisableStateChanging
 Notifies listeners that the state is about to change. More...
 
SupervisableStateChangedHandler SupervisableStateChanged
 Notifies listeners that the state has changed. More...
 
SupervisableErroredHandler SupervisableErrored
 Notifies listeners that an error occured within the controller. More...
 
SupervisableHeartbeatHandler SupervisableHeartbeat
 Notifies listeners that the component is still active. More...
 

Detailed Description

Defines the contract supported by all supervisor components.

Member Function Documentation

◆ LocateSupervisableAgent()

ISupervisable Apac.Supervisors.ISupervisor.LocateSupervisableAgent ( string  name)

Should locate a supervisable agent with the given type and name. At the supervisor's option it can request its controlling supervisor search as well.

Parameters
nameThe configured name for the supervisable agent. This value comes from the configuration, both for the named agent and the referencing agent.
Returns
The ISupervisable agent or null if said agent cannot be found.

Implemented in Apac.Supervisors.Supervisor.


The documentation for this interface was generated from the following file: