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

ScenarioServiceFactory is a class that provides factory methods for creating new instances of classes that implement the IScenarioService interface. More...

Static Public Member Functions

static IScenarioService CreateScenarioService (string socketHostName, int socketPort, Dictionary< string, object > scenarioServiceConfig, PropertyChangedEventHandler listener)
 Create a new ScenarioService instance with an IMessagingClient connected to a Correlator on the given host and port, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService. More...
 
static IScenarioService CreateScenarioService (string socketHostName, int socketPort, string processName, Dictionary< string, object > scenarioServiceConfig, PropertyChangedEventHandler listener)
 Create a new ScenarioService instance with an IMessagingClient connected to a Correlator on the given host and port, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService. More...
 
static IScenarioService CreateScenarioService (IMessagingClient messagingClient, Dictionary< string, object > scenarioServiceConfig, PropertyChangedEventHandler listener)
 Create a new ScenarioService instance using the supplied IMessagingClient to connect to a Correlator, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService. More...
 
static IScenarioService CreateScenarioService (IEventService eventService, Dictionary< string, object > scenarioServiceConfig, PropertyChangedEventHandler listener)
 Create a new ScenarioService instance using the supplied IEventService to connect to a Correlator, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService. More...
 

Detailed Description

ScenarioServiceFactory is a class that provides factory methods for creating new instances of classes that implement the IScenarioService interface.

There are 3 variants of the factory methods:

  1. Client supplies correlator host & port;
  2. Client supplies an initialised IMessagingClient;
  3. Client supplies an initialised IEventService;

For each of the above factory methods, the client must also supply parameters for a configuration map, and a listener. Either of those additional parameters may be null. For more details of the configuration parameter, see the documentation for IScenarioService, and ScenarioServiceConfig. The names of the bound properties for which the listener will be notified are those properties of ScenarioServiceConstants whose names begin "Property", e.g. ScenarioServiceConstants.PropertyScenarioAdded

See also
IScenarioService
See also
ScenarioServiceConstants
See also
ScenarioServiceConfig
See also
ScenarioServiceFactory

Member Function Documentation

static IScenarioService Apama.Services.Scenario.ScenarioServiceFactory.CreateScenarioService ( string  socketHostName,
int  socketPort,
Dictionary< string, object >  scenarioServiceConfig,
PropertyChangedEventHandler  listener 
)
static

Create a new ScenarioService instance with an IMessagingClient connected to a Correlator on the given host and port, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService.

The EventService and MessagingClient associated with this ScenarioService will be disposed automatically, when the scenario service is disposed.

Parameters
socketHostNameName of the host where the Correlator is running.
socketPortPort number on which the Correlator is listening.
scenarioServiceConfigConfiguration properties for the scenario service. (The Map may also contain EventServiceChannel configuration properties.)
listenerThe listener to be notified of property changes.
Returns
The new IScenarioService instance.
static IScenarioService Apama.Services.Scenario.ScenarioServiceFactory.CreateScenarioService ( string  socketHostName,
int  socketPort,
string  processName,
Dictionary< string, object >  scenarioServiceConfig,
PropertyChangedEventHandler  listener 
)
static

Create a new ScenarioService instance with an IMessagingClient connected to a Correlator on the given host and port, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService.

The EventService and MessagingClient associated with this ScenarioService will be disposed automatically, when the scenario service is disposed.

Parameters
socketHostNameName of the host where the Correlator is running.
socketPortPort number on which the Correlator is listening.
processNameA display name to identify which application is responsible for this connection to the Correlator (this name is included in log files for diagnostic purposes)
scenarioServiceConfigConfiguration properties for the scenario service. (The Map may also contain EventServiceChannel configuration properties.)
listenerThe listener to be notified of property changes.
Returns
The new IScenarioService instance.
static IScenarioService Apama.Services.Scenario.ScenarioServiceFactory.CreateScenarioService ( IMessagingClient  messagingClient,
Dictionary< string, object >  scenarioServiceConfig,
PropertyChangedEventHandler  listener 
)
static

Create a new ScenarioService instance using the supplied IMessagingClient to connect to a Correlator, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService.

Is it the caller's responsibility to Dispose the supplied messagingClient, after the scenario service has been disposed. The implicitly created EventService will be disposed automatically.

Parameters
messagingClientThe IMessagingClient to be used by the new scenario service.
scenarioServiceConfigConfiguration properties for the scenario service. (The Map may also contain EventServiceChannel configuration properties.)
listenerThe listener to be notified of property changes.
Returns
The new IScenarioService instance.
static IScenarioService Apama.Services.Scenario.ScenarioServiceFactory.CreateScenarioService ( IEventService  eventService,
Dictionary< string, object >  scenarioServiceConfig,
PropertyChangedEventHandler  listener 
)
static

Create a new ScenarioService instance using the supplied IEventService to connect to a Correlator, and optionally pass a listener that will be added before any events are received. The listener will be notified of changes to any bound property of this IScenarioService.

Is it the caller's responsibility to Dispose the supplied eventService, after the scenario service has been disposed.

Parameters
eventServicethe IEventService to be used by the new scenario service.
scenarioServiceConfigConfiguration properties for the scenario service. (The Map may also contain EventServiceChannel configuration properties.)
listenerThe listener to be notified of property changes.
Returns
The new IScenarioService 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.