![]() |
|
Strategy objects are used to alter TriggerPoint
functions.
Recall that the two simple trigger methods, trigger()
and triggerClassifier()
,
perform their function in the following sequence:
And that the complex trigger method, triggerSituational()
does
this sequence of steps twice, the first step to find the classification to
feed into the second step.
Default strategy objects are already defined for each of the four TriggerPoint
steps,
and they are used if none are specified explicitly. For each of these steps,
there are at least two strategy objects used, one for triggering classifier
rules, and one for triggering non-classifier rules. For the filtering step,
there are actually three pairs of strategies which are used, based on the
number of rules which the finding strategy returns (zero, one, or multiple).
While the sheer number of strategies which are available can be intimidating (twelve different strategy classes can be set), typically very few will need updating, and in reality most users will only modify the filtering strategies or the combining strategies.
A number of pre-defined strategy objects are provided that
should be adequate for the majority of cases. The Java classes for these
strategy object are defined in package com.ibm.websphere.brb.strategy
.
Static constants are also defined in the interfaces for the various strategies
to allow easy access to instances of the strategy classes to set them on the TriggerPoint
.
It is also possible to write your own strategy class if the supplied ones don't perform the function you need. See Writing Your Own Strategies for more details.
Related tasks... | |
How to place a trigger point | |
Related concepts... | |
Parent: Trigger Point Framework - overview | |
Determining where to place a trigger point | |
Types of Trigger Points - overview | |
Finding strategy | |
Filtering strategy | |
Firing strategy | |
Combining strategy | |
View PDF file... | |
To view a PDF file containing this article and related articles, click: | |
![]() | |
![]() |