Developing Apama Applications > Developing Clients > The ScenarioService API > The ScenarioServiceConfig class
The ScenarioServiceConfig class
The ScenarioServiceConfig class is a helper class that is used to build a properties map used by the ScenarioSeviceFactory when creating a new ScenarioService.
*static void setAckDataTimeout(java.util.Map<String, Object> properties, long timeout)
Set the timeout for operations to wait for the Data channel to catch up.
*static void setScenarioExclusionFilter() — defined as:

static void setScenarioExclusionFilter(
java.util.Map<String, Object> properties,
java.util.Set scenarioExclusionFilter)
Set the configuration property to the set of ScenarioIDs that the client wishes to ignore.
*static void setScenarioInclusionFilter() — defined as:

static void setScenarioInclusionFilter(
java.util.Map<String, Object> properties,
java.util.Set scenarioInclusionFilter)
Set the configuration property to the set of ScenarioIDs in which the client is interested.
*static void setAutoInstanceDiscovery() — defined as:

static void setAutoInstanceDiscovery(
java.util.Map<java.lang.String,
java.lang.Object> properties,
boolean autoInstanceDiscovery)
Set the boolean configuration property to indicate if the service should discover instances automatically.
This disables the default behavior of discovering all scenario instances upon creating the scenario service and can be used as an alternative to the scenario inclusion/ exclusion filter as it allows discovering scenario definitions without necessarily having to discover all of their instances. Typically, a client will then need to call requestInstances on a IScenarioDefinition and wait for the discovery state to become COMPLETED before it can interrogate the instances of a scenario (the call to requestInstances is automatic if this property is not set).
*static void setStrongDataInboundEventQueue() — defined as:

static void setStrongDataInboundEventQueue(
java.util.Map<String, Object> properties,
boolean strong)
Set the boolean configuration property to indicate if the Data channels (EventServiceChannels), created for listening to scenario instance output variable updates, should use strong or soft references to events in the inbound event queue.
*static void setUseRawDataChannel() — defined as:

static void setUseRawDataChannel(
java.util.Map<String, Object> properties,
boolean useRawData)
Set the boolean configuration property to indicate if the Data channels (EventServiceChannels), created for listening to scenario instance output variable updates, should be subscribed to the normal Data channel (possibly throttled), or the Raw Data channel (always unthrottled).
*static void setUsernameFilter() — defined as:

static void setUsernameFilter(
java.util.Map<java.lang.String,
java.lang.Object> properties,
java.lang.String owner)
Set the configuration property to filter by a given user. Scenario service clients have the ability to listen on a per-user channel for updates from a scenario. This can significantly reduce the number of updates the client needs to discard if it is only concerned with one user’s scenarios and/or DataViews.
If the setUsernameFilter() method is used, the scenario(s) listened for must be configured to send updates on the per-user channels — this is done by sending a com.apama.scenario.ConfigureUpdates event with key sendThrottledUser or sendRawUser set to true, either for all scenarios or just the scenario(s) that the client is interacting with.
Alternatively, when starting, API clients can set the Java system property com.apama.scenario.filterUser to specify what user the ScenarioService listens to updates for (currently, one ScenarioService is only able to listen to updates for one user).
The user "*" is handled specially — all clients will receive updates for the user "*", even if filtering for a specific user.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.