Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Custom invokers

General information about invokers

To add custom invoker you need to do:

  1. Create class which implements interface Invoker<Q,R,E>
    public class PageVisitorInvoker implements Invoker<String, String, String> {

  2. Create bean in XML file in the directory "suite/invokers/" with this class
    <!-- begin: following section is used for docu generation - invoker bean -->
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd"
    default-lazy-init="true">
    <bean id="pageInvoker" class="${package}.invoker.PageVisitorInvoker"/>
    </beans>
    <!-- end: following section is used for docu generation - invoker bean -->

  3. Create component invoker with type invoker-class and set attribute class with full class name of invoker
    <!-- begin: following section is used for docu generation - invoker usage -->
    <scenario id="pageScenario" xsi:type="scenario-query-pool">
    <query-distributor xsi:type="query-distributor-round-robin"/>
    <invoker xsi:type="invoker-class" class="${package}.invoker.PageVisitorInvoker"/>
    </scenario>
    <!-- end: following section is used for docu generation - invoker usage -->

    Note:
    • full examples of the code are available in maven archetype-examples
    • instead of ${package} write the name of your package