Apama API Reference for .NET
10.0.0.2
|
IScenarioDefinition is the public interface for a class that represents a Scenario (not an instance). More...
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... | |
IScenarioInstance | CreateInstance (string owner) |
Create a new instance of this scenario, using default values for all input paramters. More... | |
IScenarioInstance | CreateInstance (string owner, Dictionary< string, object > inputParameters) |
Create a new instance of this scenario, with the supplied values for input paramters. More... | |
IScenarioInstance | CreateInstance (string owner, Dictionary< string, object > inputParameters, PropertyChangedEventHandler listener) |
Create a new instance of this Scenario, with the supplied values for input paramters, and atomically add a listener. More... | |
IScenarioInstance | CreateInstance (string owner, Dictionary< string, object > inputParameters, string propertyName, PropertyChangedEventHandler listener) |
Create a new instance of this Scenario, with the supplied values for input paramters, and atomically add a listener. More... | |
IScenarioInstance | GetInstance (long instanceId) |
Get a single specific instance of this scenario, by instance Id. More... | |
IScenarioInstance[] | GetInstances () |
Get all instances of this scenario. More... | |
ICollection< IScenarioInstance > | GetInstancesForOwner (string owner) |
Get all instances of this scenario for a specific owner. More... | |
bool | IsInputParameter (string parameterName) |
Test if a specific named parameter is an input parameter. More... | |
bool | IsOutputParameter (string parameterName) |
Test if a specific named parameter is an output parameter. 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... | |
void | RequestInstances () |
Initiate requesting instances. More... | |
Properties | |
string | Description [get] |
Get the description of the scenario. More... | |
DiscoveryStatus | DiscoveryStatus [get] |
Get the status of the internal scenario instance discovery process. More... | |
string | DisplayName [get] |
Get the display name of the scenario. More... | |
Dictionary< string, string > | ExtraParams [get] |
Return a a shallow copy (new Dictionary) of the extra parameters. More... | |
string | Id [get] |
Get the Id of the scenario. More... | |
ReadOnlyCollection< string > | InputParameterConstraints [get] |
Get the constraints of all input parameters for the scenario. More... | |
ReadOnlyCollection< object > | InputParameterDefaults [get] |
Get the default values of all input parameters for the scenario. More... | |
ReadOnlyCollection< string > | InputParameterNames [get] |
Get the names of all input parameters for the scenario. More... | |
ReadOnlyCollection< ParameterType > | InputParameterTypes [get] |
Get the types of all input parameters for the scenario. More... | |
bool | IsReadOnly [get] |
Return if the Scenario is read only or can have instances created, edited and deleted. More... | |
ReadOnlyCollection< string > | OutputParameterNames [get] |
Get the names of all output parameters for the scenario. More... | |
ReadOnlyCollection< ParameterType > | OutputParameterTypes [get] |
Get the types of all output parameters for the scenario. More... | |
ScenarioType | Type [get] |
Return the type of Scenario (i.e. DataView, Apama Query or neither). More... | |
IScenarioDefinition is the public interface for a class that represents a Scenario (not an instance).
This interface provides an API for obtaining meta-information about a scenario (parameter names, types, constraints, etc), and for creating new instances of the scenario.
Each input parameter has an associated set of optional validation constraints, expressed as an XML string. The current implementation of the Scenario Service does not enforce these constraints, but provides access to them such that a client may enforce them outside of the service. The XML is useful to drive 3rd-party validation libraries, such as the Jakarta Commons Validator.
void Apama.Services.Scenario.IScenarioDefinition.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.IScenarioDefinition.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. |
IScenarioInstance Apama.Services.Scenario.IScenarioDefinition.CreateInstance | ( | string | owner | ) |
Create a new instance of this scenario, using default values for all input paramters.
If an instance cannot be created for any reason (other than invalid input parameters), the return value will be null.
owner | id of the owner of this Scenario. |
The newly created instance, or null if the creation failed.
InvalidInputParameterException | when any of the inputParameters is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations. |
IllegalCallingThreadException | if called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition). |
IScenarioInstance Apama.Services.Scenario.IScenarioDefinition.CreateInstance | ( | string | owner, |
Dictionary< string, object > | inputParameters | ||
) |
Create a new instance of this scenario, with the supplied values for input paramters.
Any input parameters not supplied will take default values. If an instance cannot be created for any reason (other than invalid input parameters), the return value will be null.
owner | id of the owner of this Scenario. |
inputParameters | contains mappings from input parameter name to initial values. |
The newly created instance, or null if the creation failed.
InvalidInputParameterException | when any of the inputParameters is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations. |
IllegalCallingThreadException | if called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition). |
IScenarioInstance Apama.Services.Scenario.IScenarioDefinition.CreateInstance | ( | string | owner, |
Dictionary< string, object > | inputParameters, | ||
PropertyChangedEventHandler | listener | ||
) |
Create a new instance of this Scenario, with the supplied values for input paramters, and atomically add a listener.
Any input parameters not supplied will take default values. If an instance cannot be created for any reason (other than invalid input parameters), the return value will be null.
owner | id of the owner of this Scenario. |
inputParameters | contains mappings from input parameter name to initial values. |
listener | a listener (all properties) to register atomically to the instance. |
The newly created instance, or null if the creation failed.
InvalidInputParameterException | when any of the inputParameters is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations. |
IllegalCallingThreadException | if called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition). |
IScenarioInstance Apama.Services.Scenario.IScenarioDefinition.CreateInstance | ( | string | owner, |
Dictionary< string, object > | inputParameters, | ||
string | propertyName, | ||
PropertyChangedEventHandler | listener | ||
) |
Create a new instance of this Scenario, with the supplied values for input paramters, and atomically add a listener.
Any input parameters not supplied will take default values. If an instance cannot be created for any reason (other than invalid input parameters), the return value will be null.
owner | id of the owner of this Scenario. |
inputParameters | contains mappings from input parameter name to initial values. |
propertyName | the property the listener listens to. |
listener | a listener to register atomically to the instance. |
The newly created instance, or null if the creation failed.
InvalidInputParameterException | when any of the inputParameters is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations. |
IllegalCallingThreadException | if called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition). |
IScenarioInstance Apama.Services.Scenario.IScenarioDefinition.GetInstance | ( | long | instanceId | ) |
Get a single specific instance of this scenario, by instance Id.
instanceId | The Id of the required instance. |
IScenarioInstance [] Apama.Services.Scenario.IScenarioDefinition.GetInstances | ( | ) |
Get all instances of this scenario.
The returned List is a shallow copy (new List) of the instances.
ICollection<IScenarioInstance> Apama.Services.Scenario.IScenarioDefinition.GetInstancesForOwner | ( | string | owner | ) |
Get all instances of this scenario for a specific owner.
The returned List is a shallow copy (new ICollection) of only the relevant instances. /remarks>
owner | The owner for which instances are required. |
bool Apama.Services.Scenario.IScenarioDefinition.IsInputParameter | ( | string | parameterName | ) |
Test if a specific named parameter is an input parameter.
parameterName | The name of a paramter to be tested. |
bool Apama.Services.Scenario.IScenarioDefinition.IsOutputParameter | ( | string | parameterName | ) |
Test if a specific named parameter is an output parameter.
parameterName | The name of a paramter to be tested. |
void Apama.Services.Scenario.IScenarioDefinition.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.IScenarioDefinition.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. |
void Apama.Services.Scenario.IScenarioDefinition.RequestInstances | ( | ) |
Initiate requesting instances.
This is called automatically when the scenario is discovered after creating the scenario service after listeners on the service have been fired unless the IScenarioService.ConfigAutoInstanceDiscovery is set to false.
If the discovery status is not PENDING, this is a no-op.
|
get |
Get the description of the scenario.
This is not a formal description, but a human readable description provided by the scenario author.
|
get |
Get the status of the internal scenario instance discovery process.
|
get |
Get the display name of the scenario.
|
get |
Return a a shallow copy (new Dictionary) of the extra parameters.
|
get |
Get the Id of the scenario.
This is the Id of the scenario, not of an instance. This Id is unique within the Correlator.
Typically, the scenarioID will be a string derived from the scenario name that was used when the user saved the scenario from Scenario Manager. This Id is also the same as the namespace/package used for auto-generated MonitorScript for the scenario.
e.g. If the user saved the scenario with the name "limit-order", the Id would be "Scenario_limit$002dorder".
|
get |
Get the constraints of all input parameters for the scenario.
Each input parameter has an associated set of optional validation constraints, expressed as an XML string. The current implementation of the Scenario Service does not enforce these constraints, but provides access to them such that a client may enforce them outside of the service.
|
get |
Get the default values of all input parameters for the scenario.
|
get |
Get the names of all input parameters for the scenario.
|
get |
Get the types of all input parameters for the scenario.
Note that these are not .NET types, but the types of the scenario parameters.
The read-only List (possibly empty) of all input field types.
|
get |
|
get |
Get the names of all output parameters for the scenario.
|
get |
Get the types of all output parameters for the scenario.
Note that these are not .NET types, but the types of the scenario parameters.
The read-only List (possibly empty) of all output field types.
|
get |
Return the type of Scenario (i.e. DataView, Apama Query or neither).