|
AP&C API Reference
|
The executive supervisor is the main control point for the system. The system is composed of various supervisors performing the rolls needed to meet system requirements. More...
Public Member Functions | |
| delegate void | MessageHandler (string message) |
| The delegate used to handle messages from the executive supervisor. More... | |
| override object | InitializeLifetimeService () |
| Return an indefinite lease. More... | |
Public Member Functions inherited from Apac.Supervisors.Supervisor | |
| Licensing.AcquisitionResponse | RequestLocks (Licensing.LicensedFeatures features) |
This default implementation will return null. More... | |
| Licensing.ReleaseResponse | ReleaseLock (string acquisitionId) |
| void | Initialize (SupervisableConfig config, ISupervisor exec) |
| Do basic initialization of simple supervisable configuraiton. More... | |
| void | ResolveReferences () |
| Prompts subordinates to resolve their references (supervisors don't have references). More... | |
| void | CheckReferencesStates () |
| Prompts the subordinates to check their references' states (supervisors don't have references). More... | |
| void | Initialize (ConfigElement config) |
| Initialized the supervisor from configuration. More... | |
| ISupervisable | LocateSupervisableAgent (string name) |
| Initiates the call chain to locate the supervisable agent with the given name. More... | |
| ISupervisable[] | LocateSupervisableAgents (Predicate< ISupervisable > predicate, bool askExec) |
| Initiates the call chain to locate the supervisable agent with the given name. 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 () |
| Instructs the supervisor to start operations. This call results in a No-Op if the supervisor is not in a Stopped or Initialized state. More... | |
| void | Stop () |
| Instructs the supervisor to stop operations. This call results in a No-Op if the supervisor is not running. More... | |
| void | AddSubordinate (ISupervisable subordinate) |
| Adds a subordinate under the control of the supervisor. More... | |
| void | RemoveSubordinate (string name) |
| Removes the subordinate with the given name; More... | |
| void | StartSubordinate (string name) |
| Starts the subordinate with the given name; More... | |
| void | StopSubordinate (string name) |
| Stops the subordinate with the given name; More... | |
| SupervisableDescription[] | ListSubordinates () |
| Lists the subordinates. More... | |
| SupervisableState | GetSubordinateState (string name) |
| Gets the state of the subordinate. More... | |
| override object | InitializeLifetimeService () |
| Ensures this remotable object's lease never times out. Subclassed supervisors wanting to manage leases more tightly should override this and not call this parent implementation. More... | |
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... | |
Protected Member Functions | |
| override AcquisitionResponse | OnRequestLocks (LicensedFeatures features) |
| Called when the license needs to be checked by a subordinate. More... | |
| override ReleaseResponse | OnReleaseLock (string acquisitionId) |
| Called when the license needs to be released by a subordinate. More... | |
| override void | OnInitialize (ConfigElement config) |
| Initializes the executive supervisor by creating instances of all subordinate supervisors and initializing them. This all happens in the same thread as the executive. More... | |
| override void | OnStarting () |
| Called when [starting]. More... | |
| override void | OnStart () |
| Signals when Supervisor.Start() has been called. More... | |
| override void | OnStop () |
| Signals when Supervisor.Stop() has been called. More... | |
| override void | OnStateChangeRunning () |
| Called when [state change running]. More... | |
| override void | OnStateChangeStopped () |
| Called when [state change stopped]. More... | |
| override ISupervisable | OnLocateSupervisableAgent (string name) |
| Provides subclasses the opportunity to override the agent lookup process. More... | |
| override ISupervisable[] | OnLocateSupervisableAgents (Predicate< ISupervisable > predicate, bool askExec) |
| Called when [locate supervisable agents]. More... | |
Protected Member Functions inherited from Apac.Supervisors.Supervisor | |
| virtual Licensing.AcquisitionResponse | OnRequestLocks (Licensing.LicensedFeatures features) |
| Called when the license needs to be checked by a subordinate. More... | |
| virtual void | OnStateChanging (SupervisableState currentState, SupervisableState newState) |
| Signals when the state is changing. More... | |
| virtual void | OnStateChanged (SupervisableState previousState, SupervisableState newState) |
| virtual void | OnException (Exception ex) |
| void | SetState (SupervisableState newState) |
| Changes the state of the supervisor to the new state. More... | |
| virtual void | OnStateChangeStarting () |
| virtual void | OnStateChangeStopping () |
| virtual void | OnStateChangeInitializing () |
| virtual void | OnStateChangeInitialized () |
| virtual void | OnStateChangeErrored () |
| virtual void | OnSupervisableHeartbeat (ISupervisable sender, DateTime heartbeat) |
| This signature was carefully chosen to let a subordinate report its heartbeat OR to let a supervisor report a subordinate heartbeat up the controll chain. More... | |
| virtual void | OnSubordinateStateChanging (ISupervisable sender, SupervisableStateChangeEventArgs args) |
| virtual void | OnSubordinateStateChanged (ISupervisable sender, SupervisableStateChangeEventArgs args) |
| virtual void | OnSubordinateHeartbeat (ISupervisable sender, EventArgs args) |
| virtual void | OnSubordinateErrored (ISupervisable sender, SupervisableErroredEventArgs args) |
Properties | |
| PluginCache< ushort > | PluginCache [get] |
| Gets the plugin cache. More... | |
Properties inherited from Apac.Supervisors.Supervisor | |
| string | Name [get] |
| Gets the configured name for the supervisor. More... | |
| string | Description [get] |
| Get the configured description for the supervisor. More... | |
| bool | Prioritized [get] |
| Indicates if the supervisor should be executed on a higher thread priority. More... | |
| DateTime | LastHeartbeat [get] |
| Gets the last heartbeat. More... | |
| bool | IsRunning [get] |
| Gets a value indicating whether this instance is running. More... | |
| Supervisors.ISupervisor | ExecutiveSupervisor [get] |
| Gets the excecutive supervisor. More... | |
| 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 state of the supervisor. More... | |
| SupervisableState | PreviousState [get] |
| Gets the previos state of the supervisor. More... | |
| Exception | LastException [get] |
| Gets the last exception that occured in the supervisor. More... | |
| SupervisableCollection | Subordinates [get] |
| Lazy-initialized list of components that are supervised by this supervisor. More... | |
| log4net.ILog | Log [get] |
| Gets the log4net.ILog for the instance. More... | |
Properties inherited from Apac.Supervisors.ISupervisor | |
| 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 | |
| MessageHandler | Message |
| Occurs when the executive supervisor wants to send a message. More... | |
Events inherited from Apac.Supervisors.Supervisor | |
| SupervisableErroredHandler | SubordinateErrored |
| SupervisableHeartbeatHandler | SubordinateHeartbeat |
| SupervisableStateChangingHandler | SubordinateStateChanging |
| SupervisableStateChangedHandler | SubordinateStateChanged |
| SupervisableStateChangedHandler | SupervisableStateChanged |
| This event is raised when the supervised state changes. For this event the arguments will contain the previous state and the new state. More... | |
| SupervisableStateChangingHandler | SupervisableStateChanging |
| This event is raised just prior to the supervised state being changed. For this event the arguments will only contain the current state; use SupervisableStateChangeEventArgs.CurrentState as SupervisableStateChangeEventArgs.CurrentState will always contain SupervisableState.Unknown. More... | |
| SupervisableErroredHandler | SupervisableErrored |
| This event is raised if an exception is encountered by a supervisor. More... | |
| SupervisableHeartbeatHandler | SupervisableHeartbeat |
| This event is raised on a periodic basis as a heartbeat to the supervisor. More... | |
Events inherited from Apac.Supervisors.ISupervisor | |
| 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... | |
The executive supervisor is the main control point for the system. The system is composed of various supervisors performing the rolls needed to meet system requirements.
|
inline |
Return an indefinite lease.
null.| delegate void Apac.Supervisors.ExecutiveSupervisor.MessageHandler | ( | string | message | ) |
The delegate used to handle messages from the executive supervisor.
| message | The message. |
|
inlineprotectedvirtual |
Initializes the executive supervisor by creating instances of all subordinate supervisors and initializing them. This all happens in the same thread as the executive.
| config | The configuration from which the executive supervisor will initialize. |
Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Provides subclasses the opportunity to override the agent lookup process.
| name | The name of the agent being requested, as defined in the configuration. |
null. Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Called when [locate supervisable agents].
| predicate | The predicate. |
| askExec | if set to true [ask exec]. |
Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Called when the license needs to be released by a subordinate.
| acquisitionId | The acquisition id. |
null by default, but overloads return a valid instance of Licensing.ReleaseResponse indicating the result of the release operation.Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotected |
Called when the license needs to be checked by a subordinate.
| features | The features. |
null by default, but overloads return a valid instance of Licensing.AcquisitionResponse indicating the result of the request.
|
inlineprotectedvirtual |
Signals when Supervisor.Start() has been called.
Implements Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Called when [starting].
Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Called when [state change running].
Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Called when [state change stopped].
Reimplemented from Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Signals when Supervisor.Stop() has been called.
Implements Apac.Supervisors.Supervisor.
|
get |
Gets the plugin cache.
The plugin cache.
| MessageHandler Apac.Supervisors.ExecutiveSupervisor.Message |
Occurs when the executive supervisor wants to send a message.