Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Relation of listeners and Jagger services

Jagger is providing set of services to simplify custom code development.
Services allow to access Jagger internal components with small effort. What services exist you can find under link: Implementations of Jagger services
All custom listeners have access to Jagger services. But list of available services can be different for different types of listeners.
Please see table below to find what services can be used in what listeners.

/* begin: following section is used for docu generation - listeners to services relation */
/* Services available for test listener */
if (environment.equals(JaggerPlace.TEST_LISTENER)){
metricService = new DefaultMetricService(sessionId, taskId, context); /* Available */
sessionInfoService = new DefaultSessionInfoService(context); /* Available */
}
/* Services available for test group listener */
if (environment.equals(JaggerPlace.TEST_GROUP_LISTENER)){
metricService = new EmptyMetricService(JaggerPlace.TEST_GROUP_LISTENER); /* NOT AVAILABLE */
sessionInfoService = new DefaultSessionInfoService(context); /* Available */
}
/* Services available for test suite listener */
if (environment.equals(JaggerPlace.TEST_SUITE_LISTENER)){
metricService = new EmptyMetricService(JaggerPlace.TEST_SUITE_LISTENER); /* NOT AVAILABLE */
sessionInfoService = new DefaultSessionInfoService(context); /* Available */
}
/* end: following section is used for docu generation - listeners to services relation */

If you will try to use unavailable service in some listener - nothing will happen and warning will be logged
Example of services usage in listeners are available in maven archetype-examples or here: Custom listener examples code