Package org.jboss.byteman.agent.submit

Examples of org.jboss.byteman.agent.submit.Submit


        // if any Byteman config changes have been requested and
        // are allowed upload all reconfigured system property
        // settings to the agent.
        BMUnitConfigState previousConfigState = currentConfigState.previous;
        if (needPropertyReset(currentConfigState, previousConfigState)) {
            Submit submit = new Submit(currentConfigState.getHost(), currentConfigState.getPort());
            Properties properties = new Properties();
            if (configurePropertyReset(currentConfigState, previousConfigState, properties)) {
                submit.setSystemProperties(properties);
            }
        }
    }
View Full Code Here


        // if we uploaded any reconfigured system property settings
        // to the agent then revert them
        BMUnitConfigState previousConfigState = currentConfigState.previous;
        if (previousConfigState != null && previousConfigState.isAllowConfigUpdate()) {
            if (needPropertyReset(previousConfigState, currentConfigState)) {
                Submit submit = new Submit(currentConfigState.getHost(), currentConfigState.getPort());
                Properties properties = new Properties();
                if (configurePropertyReset(previousConfigState, currentConfigState, properties)) {
                    submit.setSystemProperties(properties);
                }
            }
        }
    }
View Full Code Here

    }

    public void test()
    {

        Submit submit = new Submit();
        ScriptRepository repository = new ScriptRepository(false);
        List<ScriptText> scripts = new ArrayList<ScriptText>();
        scripts.add(new ScriptText("dynamic", getRuleText()));

        try {
            submit.addScripts(scripts);
        } catch (Exception e) {
            System.out.println("exception submitting script");
            fail();
        }
View Full Code Here

            if (isBMUnitVerbose()) {
                System.out.println("BMUnit : cannot read file = " + filename);
            }
            throw new IOException("Cannot read Byteman rule file " + filename);
        }
        Submit submit = new Submit(getHost(), getPort());
        List<String> files =  new ArrayList<String>();
        files.add(filename);
        if (isBMUnitVerbose()) {
            System.out.println("BMUnit : loading file script = " + filename);
        }
        submit.addRulesFromFiles(files);
        fileTable.put(key, filename);
    }
View Full Code Here

        String key = className + "#"  + testName;
        String filename = fileTable.remove(key);
        if (filename == null) {
            throw new FileNotFoundException("Rule file not found for Byteman test case " + key);
        }
        Submit submit = new Submit(getHost(), getPort());
        List<String> files =  new ArrayList<String>();
        files.add(filename);
        if (isBMUnitVerbose()) {
            System.out.println("BMUnit : unloading file script = " + filename);
        }
        submit.deleteRulesFromFiles(files);
    }
View Full Code Here

        if (testname ==  null) {
            testname = "";
        }
        String key = className + "+"  + testname;
        fileTable.put(key, scriptText);
        Submit submit = new Submit(getHost(), getPort());
        if (isBMUnitVerbose()) {
            System.out.println("BMUnit : loading text script = " + key);
            // System.out.println(scriptText);
        }
        List<ScriptText> scripts = new ArrayList<ScriptText>();
        ScriptText script = new ScriptText(key, scriptText);
        scripts.add(script);
        submit.addScripts(scripts);
    }
View Full Code Here

        String key = className + "+"  + testName;
        String scriptText = fileTable.remove(key);
        if (scriptText == null) {
            throw new Exception("Rule script not found " + key);
        }
        Submit submit = new Submit(getHost(), getPort());
        if (isBMUnitVerbose()) {
            System.out.println("BMUnit : unloading text script = " + key);
        }
        List<ScriptText> scripts = new ArrayList<ScriptText>();
        ScriptText script = new ScriptText(key, scriptText);
        scripts.add(script);
        submit.deleteScripts(scripts);
    }
View Full Code Here

            throw new FileNotFoundException("Rule file not found for Byteman test case " + key);
        }
        if (!file.canRead()) {
            throw new IOException("Cannot read Byteman rule file " + filename);
        }
        Submit submit = new Submit();
        List<String> files =  new ArrayList<String>();
        files.add(filename);
        if (verbose) {
            System.out.println("BMUNit : loading file script = " + filename);
        }
        submit.addRulesFromFiles(files);
        fileTable.put(key, filename);
    }
View Full Code Here

        String key = className + "#"  + testName;
        String filename = fileTable.remove(key);
        if (filename == null) {
            throw new FileNotFoundException("Rule file not found for Byteman test case " + key);
        }
        Submit submit = new Submit();
        List<String> files =  new ArrayList<String>();
        files.add(filename);
        if (verbose) {
            System.out.println("BMUNit : unloading file script = " + filename);
        }
        submit.deleteRulesFromFiles(files);
    }
View Full Code Here

        if (testname ==  null) {
            testname = "";
        }
        String key = className + "+"  + testname;
        fileTable.put(key, scriptText);
        Submit submit = new Submit();
        if (verbose) {
            System.out.println("BMUNit : loading text script = " + key);
            // System.out.println(scriptText);
        }
        List<ScriptText> scripts = new ArrayList<ScriptText>();
        ScriptText script = new ScriptText(key, scriptText);
        scripts.add(script);
        submit.addScripts(scripts);
    }
View Full Code Here

TOP

Related Classes of org.jboss.byteman.agent.submit.Submit

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.