The interactive realization of BeanShell and Zorka of Zorka source code interpretation

Source: Internet
Author: User

First, BeanShell basic knowledge
Calling BeanShell from the application
Create an interpreter for BeanShell (interpreter)
Use the eval () and source () commands to evaluate a string and run a script file
Use the Set () method to pass a reference to a variable to an object
Use the Get () method to get the result of a variable again

Second, register the Java object in the BeanShell
The Java code passes the variables to BeanShell through the interpreter interpreter of the BeanShell library.
The Put method in Zorkabshagent.java calls the set method of interpreter to Spylib, Zorkalib, Tracerlib, Zabbixlib, Nagioslib, The Sysloglib instance is registered in BeanShell.

Third, Java load BeanShell and execute BeanShell
The Interpreter eval () and source () commands in the BeanShell script allow you to evaluate a string and run a script file
The action to load the BSH script is performed in Zorkabshagent.java, which executes the script by executing interpreter source (path) and eval () in the Loadscript method.

The interactive realization of BeanShell and Zorka of Zorka source code interpretation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.