-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathTraditionalPluginConfigImpl.java
More file actions
70 lines (47 loc) · 1.8 KB
/
TraditionalPluginConfigImpl.java
File metadata and controls
70 lines (47 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package io.oneagent.plugin.config;
import java.util.Properties;
/**
* <pre>
* 支持的配置项:
* agentJarPath=xxx.jar
* appendToSystemClassLoaderSearch=
* agentInitMethod=premain/agentmain
* agentArgs=
* enabled=
* </pre>
*
* @author hengyunabc 2020-07-28
*/
public class TraditionalPluginConfigImpl extends PluginConfigImpl {
private String agentJarPath;
private String agentInitMethod;
private boolean appendToSystemClassLoaderSearch;
private boolean appendToBootstrapClassLoaderSearch;
private String agentArgs;
public TraditionalPluginConfigImpl(Properties globalProperties, Properties pluginProperties) {
super(globalProperties, pluginProperties);
this.agentJarPath = this.propertyResolver.getProperty("agentJarPath");
this.agentArgs = this.propertyResolver.getProperty("agentArgs");
this.agentInitMethod = this.propertyResolver.getProperty("agentInitMethod", "premain");
this.appendToSystemClassLoaderSearch = this.propertyResolver.getProperty("appendToSystemClassLoaderSearch", Boolean.class, Boolean.TRUE);
this.appendToBootstrapClassLoaderSearch = this.propertyResolver.getProperty("appendToBootstrapClassLoaderSearch", Boolean.class, Boolean.FALSE);
}
public String getAgentJarPath() {
return agentJarPath;
}
public boolean isAppendToSystemClassLoaderSearch() {
return appendToSystemClassLoaderSearch;
}
public boolean isAppendToBootstrapClassLoaderSearch() {
return appendToBootstrapClassLoaderSearch;
}
public String getAgentArgs() {
return agentArgs;
}
public String getAgentInitMethod() {
return agentInitMethod;
}
public void setAgentInitMethod(String agentInitMethod) {
this.agentInitMethod = agentInitMethod;
}
}