C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.Utilities.SimulationStatusMonitor Class Reference

Monitors the status of analyses as they run. More...

Public Member Functions

 SimulationStatusMonitor ()
 Initialize a new SimulationStatusMonitor with an empty list of monitored simulations.
 
void AbortAll ()
 Cancels all active polling threads.
 
void MonitorSimulationRequest (IAPIResourceView view, Action simulationRequest)
 Initiates a request for the specified view's simulation results and monitors it until completion.
 
void Reset ()
 Cancels all active polling and clears the list of known simulations.
 
delegate void SimulationStatusAddedDelegate (SimulationStatusMonitor sender, SimulationStatus added)
 A handler that can respond to a SimulationStatusAdded event.
 
delegate void SimulationStatusChangedDelegate (SimulationStatusMonitor sender, SimulationStatus changed)
 A handler that can respond to a SimulationStatusChanged event.
 

Public Attributes

double MaxPollInterval = 5.0
 Maximum time before polling the view to get a new time remaining.
 
int MaxTimeouts = 3
 Maximum number of consecutive timeouts before we stop polling the server and return the timeout error.
 
SimulationStatusAddedDelegate SimulationStatusAdded
 An event that fires whenever a new SimulationStatus is added to this monitor.
 
SimulationStatusChangedDelegate SimulationStatusChanged
 An event that fires whenever a SimulationStatus being monitored undergoes a change.
 

Properties

List< SimulationStatusMonitoredSimulations [get]
 Copy of current simulations, so something just hooking into the monitor can get a history.
 
int NumActivePolls [get]
 Tracks the number of currently running threads.
 

Detailed Description

Monitors the status of analyses as they run.

Definition at line 16 of file SimulationStatusMonitor.cs.

Constructor & Destructor Documentation

◆ SimulationStatusMonitor()

AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusMonitor ( )
inline

Initialize a new SimulationStatusMonitor with an empty list of monitored simulations.

Definition at line 55 of file SimulationStatusMonitor.cs.

Member Function Documentation

◆ AbortAll()

void AnalyzeRe.Utilities.SimulationStatusMonitor.AbortAll ( )
inline

Cancels all active polling threads.

Definition at line 63 of file SimulationStatusMonitor.cs.

◆ MonitorSimulationRequest()

void AnalyzeRe.Utilities.SimulationStatusMonitor.MonitorSimulationRequest ( IAPIResourceView  view,
Action  simulationRequest 
)
inline

Initiates a request for the specified view's simulation results and monitors it until completion.

Parameters
viewThe view on which the simulation request is executing.
simulationRequestThe simulation request to execute.

Definition at line 87 of file SimulationStatusMonitor.cs.

◆ Reset()

void AnalyzeRe.Utilities.SimulationStatusMonitor.Reset ( )
inline

Cancels all active polling and clears the list of known simulations.

Definition at line 74 of file SimulationStatusMonitor.cs.

◆ SimulationStatusAddedDelegate()

delegate void AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusAddedDelegate ( SimulationStatusMonitor  sender,
SimulationStatus  added 
)

A handler that can respond to a SimulationStatusAdded event.

Parameters
senderThe SimulationStatusMonitor that invoked the SimulationStatusAdded event.
addedThe SimulationStatus that was added.

◆ SimulationStatusChangedDelegate()

delegate void AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusChangedDelegate ( SimulationStatusMonitor  sender,
SimulationStatus  changed 
)

A handler that can respond to a SimulationStatusChanged event.

Parameters
senderThe SimulationStatusMonitor that invoked the SimulationStatusChanged event.
changedThe SimulationStatus that was changed.

Member Data Documentation

◆ MaxPollInterval

double AnalyzeRe.Utilities.SimulationStatusMonitor.MaxPollInterval = 5.0

Maximum time before polling the view to get a new time remaining.

Definition at line 27 of file SimulationStatusMonitor.cs.

◆ MaxTimeouts

int AnalyzeRe.Utilities.SimulationStatusMonitor.MaxTimeouts = 3

Maximum number of consecutive timeouts before we stop polling the server and return the timeout error.

Definition at line 29 of file SimulationStatusMonitor.cs.

◆ SimulationStatusAdded

SimulationStatusAddedDelegate AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusAdded

An event that fires whenever a new SimulationStatus is added to this monitor.

Definition at line 43 of file SimulationStatusMonitor.cs.

◆ SimulationStatusChanged

SimulationStatusChangedDelegate AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusChanged

An event that fires whenever a SimulationStatus being monitored undergoes a change.

Definition at line 50 of file SimulationStatusMonitor.cs.

Property Documentation

◆ MonitoredSimulations

List<SimulationStatus> AnalyzeRe.Utilities.SimulationStatusMonitor.MonitoredSimulations
get

Copy of current simulations, so something just hooking into the monitor can get a history.

Definition at line 34 of file SimulationStatusMonitor.cs.

◆ NumActivePolls

int AnalyzeRe.Utilities.SimulationStatusMonitor.NumActivePolls
get

Tracks the number of currently running threads.

Definition at line 31 of file SimulationStatusMonitor.cs.


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