Examples of declareBean()


Examples of org.apache.bsf.BSFManager.declareBean()

            // create the BSF manager
            BSFManager bsfManager = new BSFManager();
            bsfManager.setClassLoader(cl);

            // expose the event objects to the script
            bsfManager.declareBean("request", request, HttpServletRequest.class);
            bsfManager.declareBean("response", response, HttpServletResponse.class);

            // get the script type
            String scriptType = BSFManager.getLangFromFilename(event.invoke);
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

            BSFManager bsfManager = new BSFManager();
            bsfManager.setClassLoader(cl);

            // expose the event objects to the script
            bsfManager.declareBean("request", request, HttpServletRequest.class);
            bsfManager.declareBean("response", response, HttpServletResponse.class);

            // get the script type
            String scriptType = BSFManager.getLangFromFilename(event.invoke);

            // load the script
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

        res.setDataType(SampleResult.TEXT); // Default (can be overridden by the script)

        res.sampleStart();
        try {
            initManager(mgr);
            mgr.declareBean("SampleResult", res, res.getClass()); // $NON-NLS-1$

            // These are not useful yet, as have not found how to get updated values back
            //mgr.declareBean("ResponseCode", "200", String.class); // $NON-NLS-1$
            //mgr.declareBean("ResponseMessage", "OK", String.class); // $NON-NLS-1$
            //mgr.declareBean("IsSuccess", Boolean.TRUE, Boolean.class); // $NON-NLS-1$
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    public AssertionResult getResult(SampleResult response) {
        AssertionResult result = new AssertionResult(getName());
        BSFManager mgr =null;
        try {
            mgr = getManager();
            mgr.declareBean("SampleResult", response, SampleResult.class);
            mgr.declareBean("AssertionResult", result, AssertionResult.class);
            processFileOrScript(mgr);
            result.setError(false);
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

        AssertionResult result = new AssertionResult(getName());
        BSFManager mgr =null;
        try {
            mgr = getManager();
            mgr.declareBean("SampleResult", response, SampleResult.class);
            mgr.declareBean("AssertionResult", result, AssertionResult.class);
            processFileOrScript(mgr);
            result.setError(false);
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
            result.setFailure(true);
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

            mgr = getManager();
            if (mgr == null) {
                log.error("Problem creating BSF manager");
                return;
            }
            mgr.declareBean("sampleEvent", event, SampleEvent.class);
            SampleResult result = event.getResult();
            mgr.declareBean("sampleResult", result, SampleResult.class);
            processFileOrScript(mgr);
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

                log.error("Problem creating BSF manager");
                return;
            }
            mgr.declareBean("sampleEvent", event, SampleEvent.class);
            SampleResult result = event.getResult();
            mgr.declareBean("sampleResult", result, SampleResult.class);
            processFileOrScript(mgr);
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
        } finally {
            if (mgr != null) {
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

        res.setDataType(SampleResult.TEXT); // Default (can be overridden by the script)

        res.sampleStart();
    try {
      initManager(mgr);
      mgr.declareBean("SampleResult", res, res.getClass()); // $NON-NLS-1$
     
      // These are not useful yet, as have not found how to get updated values back
      //mgr.declareBean("ResponseCode", "200", String.class); // $NON-NLS-1$
      //mgr.declareBean("ResponseMessage", "OK", String.class); // $NON-NLS-1$
      //mgr.declareBean("IsSuccess", Boolean.TRUE, Boolean.class); // $NON-NLS-1$
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

            // create the BSF manager
            BSFManager bsfManager = new BSFManager();
            bsfManager.setClassLoader(cl);

            // expose the event objects to the script
            bsfManager.declareBean("request", request, HttpServletRequest.class);
            bsfManager.declareBean("response", response, HttpServletResponse.class);

            // get the script type
            String scriptType = BSFManager.getLangFromFilename(event.invoke);
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

            BSFManager bsfManager = new BSFManager();
            bsfManager.setClassLoader(cl);

            // expose the event objects to the script
            bsfManager.declareBean("request", request, HttpServletRequest.class);
            bsfManager.declareBean("response", response, HttpServletResponse.class);

            // get the script type
            String scriptType = BSFManager.getLangFromFilename(event.invoke);

            // load the script
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.