AP&C API Reference
|
The Supervisor used to manage controller implementations. More...
Protected Member Functions | |
override void | OnInitialize (Apac.Configuration.ConfigElement config) |
override void | OnStart () |
Signals when Start() has been called. More... | |
override void | OnStop () |
Signals when Stop() has been called. More... | |
![]() | |
virtual Licensing.AcquisitionResponse | OnRequestLocks (Licensing.LicensedFeatures features) |
Called when the license needs to be checked by a subordinate. More... | |
virtual Licensing.ReleaseResponse | OnReleaseLock (string acquisitionId) |
Called when the license needs to be released by a subordinate. More... | |
virtual void | OnStarting () |
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) |
virtual ISupervisable | OnLocateSupervisableAgent (string name) |
Provides subclasses the opportunity to override the agent lookup process. More... | |
virtual ISupervisable[] | OnLocateSupervisableAgents (Predicate< ISupervisable > predicate, bool askExec) |
void | SetState (SupervisableState newState) |
Changes the state of the supervisor to the new state. More... | |
virtual void | OnStateChangeStarting () |
virtual void | OnStateChangeRunning () |
virtual void | OnStateChangeStopping () |
virtual void | OnStateChangeStopped () |
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) |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
void | Initialize (Apac.Configuration.SupervisableConfig config, Supervisors.ISupervisor exec) |
Initializes the component with the given SupervisableConfig (or derivative) and ISupervisor. More... | |
![]() | |
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... | |
![]() | |
SupervisableCollection | Subordinates [get] |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
SupervisableStateChangingHandler | SubordinateStateChanging |
SupervisableStateChangedHandler | SubordinateStateChanged |
SupervisableErroredHandler | SubordinateErrored |
SupervisableHeartbeatHandler | SubordinateHeartbeat |
![]() | |
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 Supervisor used to manage controller implementations.
|
inlineprotectedvirtual |
Signals when Start() has been called.
Implements Apac.Supervisors.Supervisor.
|
inlineprotectedvirtual |
Signals when Stop() has been called.
Implements Apac.Supervisors.Supervisor.