Apama API Reference for .NET  9.10.0.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Apama.Services.Scenario.IScenarioInstance Interface Reference

IScenarioInstance is the public interface for a class that represents a Scenario instance. More...

Public Member Functions

void AddListener (PropertyChangedEventHandler listener)
 Add a listener to the list of those interested in changes to any object property, or any scenario instance (input and/or output) parameter. More...
 
void AddListener (string propertyName, PropertyChangedEventHandler listener)
 Add a listener to the list of those interested in changes to the object property with given name, or the scenario instance (input and/or output) parameter with the given name. More...
 
bool Delete ()
 Delete this instance. More...
 
object GetValue (string parameterName)
 Get the value of a single specific (input or output) parameter of this instance. More...
 
void RemoveListener (PropertyChangedEventHandler listener)
 Remove a listener from the list of those interested in changes to any object property, or scenario instance parameter. More...
 
void RemoveListener (string propertyName, PropertyChangedEventHandler listener)
 Remove a listener from the list of those interested in changes to the object property with given name, or the scenario instance parameter with the given name. More...
 
bool SetValue (string parameterName, object value)
 Set the value of a single specific (input) parameter of this instance. More...
 
bool SetValues (Dictionary< string, object > valuesMap)
 Set several (input) parameter values of this instance. More...
 

Properties

long Id [get]
 Get the Id of the instance. More...
 
long LastUpdateTime [get]
 Get the timestamp (milliseconds) of the last known update event for this instance. The folloing events will set an update time - Created, Edited, Update. More...
 
string Owner [get]
 Get the owner (username) of the instance. More...
 
IScenarioDefinition ScenarioDefinition [get]
 Get the Scenario Definition. More...
 
InstanceState State [get]
 Get the current state of the instance. More...
 

Detailed Description

IScenarioInstance is the public interface for a class that represents a Scenario instance.

This API provides a mechanism to access the values of individual parameters, and to delete the instance. It is also possible to determine the timestamp of the last received Update event.

Member Function Documentation

void Apama.Services.Scenario.IScenarioInstance.AddListener ( PropertyChangedEventHandler  listener)

Add a listener to the list of those interested in changes to any object property, or any scenario instance (input and/or output) parameter.

Parameters
listenerproperty change listener to invoke when a property or parameter changes value.
void Apama.Services.Scenario.IScenarioInstance.AddListener ( string  propertyName,
PropertyChangedEventHandler  listener 
)

Add a listener to the list of those interested in changes to the object property with given name, or the scenario instance (input and/or output) parameter with the given name.

Parameters
propertyNamename of the property or parameter to register interest in.
listenerproperty change listener to invoke when a property or parameter changes value.
bool Apama.Services.Scenario.IScenarioInstance.Delete ( )

Delete this instance.

Returns
true if the instance deleted, false otherwise.
Exceptions
IllegalCallingThreadExceptionif called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition).
object Apama.Services.Scenario.IScenarioInstance.GetValue ( string  parameterName)

Get the value of a single specific (input or output) parameter of this instance.

Parameters
parameterNameThe name of the parameter to be retrieved.
Returns
The current value of the specified parameter.
void Apama.Services.Scenario.IScenarioInstance.RemoveListener ( PropertyChangedEventHandler  listener)

Remove a listener from the list of those interested in changes to any object property, or scenario instance parameter.

Parameters
listenerproperty change listener to remove from the interest list.
void Apama.Services.Scenario.IScenarioInstance.RemoveListener ( string  propertyName,
PropertyChangedEventHandler  listener 
)

Remove a listener from the list of those interested in changes to the object property with given name, or the scenario instance parameter with the given name.

Parameters
propertyNamename of the property or parameter to remove interest in.
listenerproperty change listener to remove from the interest list.
bool Apama.Services.Scenario.IScenarioInstance.SetValue ( string  parameterName,
object  value 
)

Set the value of a single specific (input) parameter of this instance.

Parameters
parameterNameThe name of the parameter to be set.
valueThe new value.
Returns

true if edit was successful, false otherwise.

Exceptions
InvalidInputParameterExceptionwhen value is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations.
IllegalCallingThreadExceptionif called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition).
bool Apama.Services.Scenario.IScenarioInstance.SetValues ( Dictionary< string, object >  valuesMap)

Set several (input) parameter values of this instance.

Parameters
valuesMapa Map (key String parameterName : value Object) of the values to be set in this instance.
Returns

true if edit was successful, false otherwise.

Exceptions
InvalidInputParameterExceptionwhen any value in the valuesMap is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations.
IllegalCallingThreadExceptionif called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition).

Property Documentation

long Apama.Services.Scenario.IScenarioInstance.Id
get

Get the Id of the instance.

Returns
The Id.
long Apama.Services.Scenario.IScenarioInstance.LastUpdateTime
get

Get the timestamp (milliseconds) of the last known update event for this instance. The folloing events will set an update time - Created, Edited, Update.

Returns
the timestamp from the last seen update event, as millis since the epoch.
string Apama.Services.Scenario.IScenarioInstance.Owner
get

Get the owner (username) of the instance.

Returns
The owner.
IScenarioDefinition Apama.Services.Scenario.IScenarioInstance.ScenarioDefinition
get

Get the Scenario Definition.

Returns
The Scenario Definition.
InstanceState Apama.Services.Scenario.IScenarioInstance.State
get

Get the current state of the instance.

See also
InstanceState

for list of states

Returns
The current state of the instance
Submit a bug or feature
Copyright (c) 2013-2016 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.