Package alt.jiapi

Examples of alt.jiapi.InstrumentationDescriptor


    }
   
    public Sample2() throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Associate interceptor with descriptor
        // Set resolution to 'samples*', which means that interceptor applies
        // its work only on fields which start with 'samples'
View Full Code Here


        String meInclude = System.getProperty("method:include");
        String meExclude = System.getProperty("method:exclude");

        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor fid = new InstrumentationDescriptor();
        InstrumentationDescriptor mid = new InstrumentationDescriptor();
       
        // Add global inclusion and exclusion rules for both
        // field and method descriptors
        if (globalInclude != null) {
            StringTokenizer st = new StringTokenizer(globalInclude, ",");
            while(st.hasMoreTokens()) {
                String rule = st.nextToken();
                fid.addInclusionRule(rule);
                mid.addInclusionRule(rule);
            }
        }
        if (globalExclude != null) {
            StringTokenizer st = new StringTokenizer(globalExclude, ",");
            while(st.hasMoreTokens()) {
                String rule = st.nextToken();
                fid.addExclusionRule(rule);
                mid.addExclusionRule(rule);
            }
        }

        // Add event producer specific inclusion and exclusion rules
        if (feInclude != null) {
            StringTokenizer st = new StringTokenizer(feInclude, ",");
            while(st.hasMoreTokens()) {
                String rule = st.nextToken();
                fid.addInclusionRule(rule);
            }
        }
        if (feExclude != null) {
            StringTokenizer st = new StringTokenizer(feExclude, ",");
            while(st.hasMoreTokens()) {
                String rule = st.nextToken();
                fid.addExclusionRule(rule);
            }
        }

        if (meInclude != null) {
            StringTokenizer st = new StringTokenizer(meInclude, ",");
            while(st.hasMoreTokens()) {
                String rule = st.nextToken();
                mid.addInclusionRule(rule);
            }
        }
        if (meExclude != null) {
            StringTokenizer st = new StringTokenizer(meExclude, ",");
            while(st.hasMoreTokens()) {
                String rule = st.nextToken();
                mid.addExclusionRule(rule);
            }
        }

       
        // Use event API:
View Full Code Here

TOP

Related Classes of alt.jiapi.InstrumentationDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.