Apama API Reference for .NET
9.10.0.4
|
IScenarioService is an interface that represents the public API to the ScenarioService. More...
Inherits IDisposable.
Public Member Functions | |
void | AddListener (PropertyChangedEventHandler listener) |
Add a PropertyChangeListener that will be notified of changes to any bound property of this object. More... | |
void | AddListener (string propertyName, PropertyChangedEventHandler listener) |
Add a PropertyChangeListener that will be notified of changes to a specific named bound property of this object. More... | |
void | Destroy () |
Destroy this service and clean up resources; equivalent to calling Dispose(). More... | |
IScenarioDefinition | GetScenarioById (string scenarioId) |
Get a ScenarioDefinition for a specific scenario, using the ScenarioId as the lookup key. More... | |
IScenarioDefinition | GetScenarioByName (string scenarioDisplayName) |
Get a ScenarioDefinition for a specific scenario, using the Display name as the lookup key. More... | |
string[] | GetScenarioIds () |
Get the IDs of all known scenarios (not instances) in the correlator. More... | |
string[] | GetScenarioNames () |
Get the Display Names of all known scenarios (not instances) in the correlator. More... | |
IScenarioDefinition[] | GetScenarios () |
Get the ScenarioDefinitions of all known scenarios in the correlator. More... | |
void | RemoveListener (PropertyChangedEventHandler listener) |
Remove a PropertyChangeListener that was to be notified of changes to any bound property of this object. More... | |
void | RemoveListener (string propertyName, PropertyChangedEventHandler listener) |
Remove a PropertyChangeListener that was to be notified of changes to a specific named bound property of this object. More... | |
Properties | |
Dictionary< string, object > | Config [get] |
Get the configuration properties that define the requested operating semantics of this instance of the service. More... | |
bool | Destroyed [get] |
Determine if this service is destroyed. More... | |
DiscoveryStatus | DiscoveryStatus [get] |
Get the status of the internal scenario discovery process. More... | |
IEventService | EventService [get] |
Get the underlying EventService that is being used by this ScenarioService. More... | |
IScenarioService is an interface that represents the public API to the ScenarioService.
Since this is an asynchronous service, there is a standard pattern that clients should normally follow to ensure they become aware of all Scenarios in the correlator.
If a listener is passed to the factory method, then that listener will be notified of all scenarios as they are discovered, and the client will not "miss" any scenarios. This is the recommended usage pattern.
If a listener is not passed to the factory method, then the following pattern must always be used:
When a client listener receives a PropertyChangeEvent from this interface, the following describes the type of the [old/new] value that is passed with the event:
The Scenario Service API is thread-safe. Note that unlike other parts of the Apama API, Scenario Service listener callbacks may be invoked while locks internal to the Scenario Service are held. For this reason it is not safe to call Scenario Service methods while holding any application-defined lock that might also be acquired within a Scenario Service property change listener, as this may result in deadlock.
void Apama.Services.Scenario.IScenarioService.AddListener | ( | PropertyChangedEventHandler | listener | ) |
Add a PropertyChangeListener that will be notified of changes to any bound property of this object.
listener | The listener to be notified. |
void Apama.Services.Scenario.IScenarioService.AddListener | ( | string | propertyName, |
PropertyChangedEventHandler | listener | ||
) |
Add a PropertyChangeListener that will be notified of changes to a specific named bound property of this object.
propertyName | The name of a specific property. |
listener | The listener to be notified. |
void Apama.Services.Scenario.IScenarioService.Destroy | ( | ) |
Destroy this service and clean up resources; equivalent to calling Dispose().
This will simulate a SenarioServiceUnloaded and cause all EventServiceChannels to be removed and disconnected from the correlator. If an EventService was created implicitly, it will be also disposed by this call.
.NET client applications should destroy any created scenario services once they are finished using them.
IScenarioDefinition Apama.Services.Scenario.IScenarioService.GetScenarioById | ( | string | scenarioId | ) |
Get a ScenarioDefinition for a specific scenario, using the ScenarioId as the lookup key.
scenarioId | the Id of the scenario for which the IScenarioDefinition is required. |
IScenarioDefinition Apama.Services.Scenario.IScenarioService.GetScenarioByName | ( | string | scenarioDisplayName | ) |
Get a ScenarioDefinition for a specific scenario, using the Display name as the lookup key.
scenarioDisplayName | the Id of the scenario for which the IScenarioDefinition is required. |
string [] Apama.Services.Scenario.IScenarioService.GetScenarioIds | ( | ) |
Get the IDs of all known scenarios (not instances) in the correlator.
The returned string Array is a shallow copy (new List) of the scenario Ids.
An array of the Ids of all of the scenarios. Each item is a String.
string [] Apama.Services.Scenario.IScenarioService.GetScenarioNames | ( | ) |
Get the Display Names of all known scenarios (not instances) in the correlator.
The returned string Array is a shallow copy (new List) of the scenario names.
An array of the Display Names of all of the scenarios. Each item is a String.
IScenarioDefinition [] Apama.Services.Scenario.IScenarioService.GetScenarios | ( | ) |
Get the ScenarioDefinitions of all known scenarios in the correlator.
The returned List is a shallow copy (new List) of the scenarios.
void Apama.Services.Scenario.IScenarioService.RemoveListener | ( | PropertyChangedEventHandler | listener | ) |
Remove a PropertyChangeListener that was to be notified of changes to any bound property of this object.
listener | The listener to be removed. |
void Apama.Services.Scenario.IScenarioService.RemoveListener | ( | string | propertyName, |
PropertyChangedEventHandler | listener | ||
) |
Remove a PropertyChangeListener that was to be notified of changes to a specific named bound property of this object.
propertyName | The name of a specific property. |
listener | The listener to be removed. |
|
get |
Get the configuration properties that define the requested operating semantics of this instance of the service.
|
get |
Determine if this service is destroyed.
|
get |
Get the status of the internal scenario discovery process.
|
get |
Get the underlying EventService that is being used by this ScenarioService.