OpenNHP agent sdk interface @author haochangjiu @version JDK 8 @className OpennhpLibrary @date 2025/10/27
| 12 | * @date 2025/10/27 |
| 13 | */ |
| 14 | public interface OpennhpLibrary extends Library { |
| 15 | // load OpenNHP agent sdk |
| 16 | OpennhpLibrary INSTANCE = Native.load("nhp-agent", OpennhpLibrary.class); |
| 17 | |
| 18 | /** |
| 19 | * @description Initialization of the nhp_agent instance working directory path: |
| 20 | * The configuration files to be read are located under workingdir/etc/, |
| 21 | * and log files will be generated under workingdir/logs/. |
| 22 | * @param workingDir: the working directory path for the agent |
| 23 | * @param logLevel: 0: silent, 1: error, 2: info, 3: debug, 4: verbose |
| 24 | * return boolean Whether agent instance has been initialized successfully. |
| 25 | * @return boolean |
| 26 | * @author haochangjiu |
| 27 | * @date 2025/10/27 |
| 28 | * {@link boolean} |
| 29 | */ |
| 30 | boolean nhp_agent_init(String workingDir, int logLevel); |
| 31 | |
| 32 | /** |
| 33 | * @description Synchronously stop and release nhp_agent. |
| 34 | * @author haochangjiu |
| 35 | * @date 2025/10/27 |
| 36 | */ |
| 37 | void nhp_agent_close(); |
| 38 | /** |
| 39 | * @description Read the user information, resource information, server information, |
| 40 | * and other configuration files written under workingdir/etc, |
| 41 | * and asynchronously start the loop knocking thread. |
| 42 | * @return int |
| 43 | * @author haochangjiu |
| 44 | * @date 2025/10/27 |
| 45 | * {@link int} |
| 46 | */ |
| 47 | int nhp_agent_knockloop_start(); |
| 48 | |
| 49 | /** |
| 50 | * @description Synchronously stop the loop, knock-on sub thread |
| 51 | * @author hangchangjiu |
| 52 | * @date 2025/10/27 |
| 53 | */ |
| 54 | void nhp_agent_knockloop_stop(); |
| 55 | } |
nothing calls this directly
no outgoing calls
no test coverage detected