Skip to content

Commit 325c7ba

Browse files
committed
initial
1 parent 3d759f8 commit 325c7ba

File tree

5 files changed

+93
-0
lines changed

5 files changed

+93
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010

1111
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1212
hs_err_pid*
13+
14+
/bin
15+
/out

build-to-server-boot-test.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project name="Test Build Null plugin for server" default="packaging">
4+
<property name="dir.target.jar" value="../scouter/scouter.server.boot/testlib" />
5+
<property name="dir.classes" value="./bin" />
6+
7+
<target name="packaging">
8+
<jar destfile="${dir.target.jar}/scouter-plugin-server-null.jar">
9+
<fileset dir="${dir.classes}"/>
10+
</jar>
11+
</target>
12+
13+
</project>

build.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project name="Build Null plugin" default="packaging">
4+
<property name="dir.target.jar" value="./out" />
5+
<property name="dir.classes" value="./bin" />
6+
7+
<target name="packaging">
8+
<mkdir dir="${dir.target.jar}" />
9+
<jar destfile="${dir.target.jar}/scouter-plugin-server-null.jar">
10+
<fileset dir="${dir.classes}"/>
11+
</jar>
12+
</target>
13+
14+
</project>

scouter-plugin-server-null.iml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
4+
<output url="file://$MODULE_DIR$/bin" />
5+
<output-test url="file://$MODULE_DIR$/test" />
6+
<exclude-output />
7+
<content url="file://$MODULE_DIR$">
8+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
9+
</content>
10+
<orderEntry type="jdk" jdkName="1.7" jdkType="JavaSDK" />
11+
<orderEntry type="sourceFolder" forTests="false" />
12+
<orderEntry type="module" module-name="scouter.common" />
13+
</component>
14+
</module>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package scouter.plugin.server.none;
2+
3+
import scouter.lang.pack.*;
4+
import scouter.lang.plugin.PluginConstants;
5+
import scouter.lang.plugin.annotation.ServerPlugin;
6+
7+
/**
8+
* @author Gun Lee (gunlee01@gmail.com) on 2016. 3. 19.
9+
*/
10+
public class NullPlugin {
11+
private boolean debug = System.getProperty("scouter.plugin.server.debug", "f").equals("true") ? true : false;
12+
13+
@ServerPlugin(PluginConstants.PLUGIN_SERVER_ALERT)
14+
public void alert(AlertPack pack){
15+
println("[NullPlugin-alert] " + pack);
16+
}
17+
18+
@ServerPlugin(PluginConstants.PLUGIN_SERVER_COUNTER)
19+
public void counter(PerfCounterPack pack){
20+
println("[NullPlugin-counter] " + pack);
21+
}
22+
23+
@ServerPlugin(PluginConstants.PLUGIN_SERVER_OBJECT)
24+
public void object(ObjectPack pack){
25+
println("[NullPlugin-object] " + pack);
26+
}
27+
28+
@ServerPlugin(PluginConstants.PLUGIN_SERVER_PROFILE)
29+
public void profile(XLogProfilePack pack){
30+
println("[NullPlugin-profile] " + pack);
31+
}
32+
33+
@ServerPlugin(PluginConstants.PLUGIN_SERVER_SUMMARY)
34+
public void summary(SummaryPack pack){
35+
println("[NullPlugin-summary] " + pack);
36+
}
37+
38+
@ServerPlugin(PluginConstants.PLUGIN_SERVER_XLOG)
39+
public void xlog(XLogPack pack){
40+
println("[NullPlugin-xlog] " + pack);
41+
}
42+
43+
private void println(Object o) {
44+
debug = true;
45+
if(debug) {
46+
System.out.println(o);
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)