Commit cbdb3aed authored by Lukáš Marek's avatar Lukáš Marek

Some other renaming

parent 17a4ea74
...@@ -9,7 +9,7 @@ public class JavaAgent { ...@@ -9,7 +9,7 @@ public class JavaAgent {
public static void premain(String agentArguments, public static void premain(String agentArguments,
Instrumentation instrumentation) { Instrumentation instrumentation) {
if (!Boolean.getBoolean("jborat.noBootstrap")) { if (!Boolean.getBoolean("dislserver.noBootstrap")) {
Bootstrap.completed(instrumentation); Bootstrap.completed(instrumentation);
} }
} }
......
package ch.usi.dag.dislserver; package ch.usi.dag.dislserver;
public class JboratException extends Exception { public class DiSLServerException extends Exception {
private static final long serialVersionUID = 5272000884539359236L; private static final long serialVersionUID = 5272000884539359236L;
public JboratException() { public DiSLServerException() {
super(); super();
} }
public JboratException(String message, Throwable cause, public DiSLServerException(String message, Throwable cause,
boolean enableSuppression, boolean writableStackTrace) { boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace); super(message, cause, enableSuppression, writableStackTrace);
} }
public JboratException(String message, Throwable cause) { public DiSLServerException(String message, Throwable cause) {
super(message, cause); super(message, cause);
} }
public JboratException(String message) { public DiSLServerException(String message) {
super(message); super(message);
} }
public JboratException(Throwable cause) { public DiSLServerException(Throwable cause) {
super(cause); super(cause);
} }
} }
...@@ -11,7 +11,7 @@ public abstract class InstrumentationServer { ...@@ -11,7 +11,7 @@ public abstract class InstrumentationServer {
public static final String PROP_DEBUG = "debug"; public static final String PROP_DEBUG = "debug";
private static final boolean debug = Boolean.getBoolean(PROP_DEBUG); private static final boolean debug = Boolean.getBoolean(PROP_DEBUG);
private static final String PROP_PORT = "jborat.port"; private static final String PROP_PORT = "dislserver.port";
private static final int DEFAULT_PORT = 11217; private static final int DEFAULT_PORT = 11217;
private static final int port = Integer.getInteger(PROP_PORT, DEFAULT_PORT); private static final int port = Integer.getInteger(PROP_PORT, DEFAULT_PORT);
...@@ -59,9 +59,9 @@ public abstract class InstrumentationServer { ...@@ -59,9 +59,9 @@ public abstract class InstrumentationServer {
return; return;
} }
if (e instanceof JboratException) { if (e instanceof DiSLServerException) {
System.err.println("Jborat error: " + e.getMessage()); System.err.println("DiSL server error: " + e.getMessage());
if (debug) { if (debug) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -22,15 +22,15 @@ public class Worker extends Thread { ...@@ -22,15 +22,15 @@ public class Worker extends Thread {
private static final boolean debug = Boolean private static final boolean debug = Boolean
.getBoolean(InstrumentationServer.PROP_DEBUG); .getBoolean(InstrumentationServer.PROP_DEBUG);
private static final String PROP_EXCLIST = "jborat.exclusionList"; private static final String PROP_EXCLIST = "dislserver.exclusionList";
private static final String excListPath = private static final String excListPath =
System.getProperty(PROP_EXCLIST, null); System.getProperty(PROP_EXCLIST, null);
private static final String PROP_UNINSTR = "jborat.uninstrumented"; private static final String PROP_UNINSTR = "dislserver.uninstrumented";
private static final String uninstrPath = private static final String uninstrPath =
System.getProperty(PROP_UNINSTR, null); System.getProperty(PROP_UNINSTR, null);
private static final String PROP_INSTR = "jborat.instrumented"; private static final String PROP_INSTR = "dislserver.instrumented";
private static final String instrPath = private static final String instrPath =
System.getProperty(PROP_INSTR, null); System.getProperty(PROP_INSTR, null);
...@@ -60,7 +60,7 @@ public class Worker extends Thread { ...@@ -60,7 +60,7 @@ public class Worker extends Thread {
} }
} }
private boolean filterClass(String className) throws JboratException { private boolean filterClass(String className) throws DiSLServerException {
// race condition can be here (invocation from multiple threads) // race condition can be here (invocation from multiple threads)
// but this is not serious problem // but this is not serious problem
...@@ -81,14 +81,14 @@ public class Worker extends Thread { ...@@ -81,14 +81,14 @@ public class Worker extends Thread {
} }
if (className.equals(Type.getInternalName(Thread.class))) { if (className.equals(Type.getInternalName(Thread.class))) {
throw new JboratException(Thread.class.getName() throw new DiSLServerException(Thread.class.getName()
+ " cannot be excluded in exclusion list"); + " cannot be excluded in exclusion list");
} }
return true; return true;
} }
private Set<String> readExlusionList() throws JboratException { private Set<String> readExlusionList() throws DiSLServerException {
final String COMMENT_START = "#"; final String COMMENT_START = "#";
...@@ -114,7 +114,7 @@ public class Worker extends Thread { ...@@ -114,7 +114,7 @@ public class Worker extends Thread {
return exclSet; return exclSet;
} catch(FileNotFoundException e) { } catch(FileNotFoundException e) {
throw new JboratException(e); throw new DiSLServerException(e);
} }
} }
...@@ -126,7 +126,7 @@ public class Worker extends Thread { ...@@ -126,7 +126,7 @@ public class Worker extends Thread {
return normalClassName.replace(NORMAL_DELIM, INTERN_DELIM); return normalClassName.replace(NORMAL_DELIM, INTERN_DELIM);
} }
private void instrumentationLoop() throws JboratException, DiSLException { private void instrumentationLoop() throws DiSLServerException, DiSLException {
try { try {
...@@ -173,12 +173,12 @@ public class Worker extends Thread { ...@@ -173,12 +173,12 @@ public class Worker extends Thread {
} }
catch (IOException e) { catch (IOException e) {
throw new JboratException(e); throw new DiSLServerException(e);
} }
} }
private byte[] instrument(String className, byte[] origCode) private byte[] instrument(String className, byte[] origCode)
throws JboratException, DiSLException { throws DiSLServerException, DiSLException {
// dump uninstrumented // dump uninstrumented
if (uninstrPath != null) { if (uninstrPath != null) {
...@@ -207,7 +207,7 @@ public class Worker extends Thread { ...@@ -207,7 +207,7 @@ public class Worker extends Thread {
} }
private void dump(String className, byte[] codeAsBytes, String path) private void dump(String className, byte[] codeAsBytes, String path)
throws JboratException { throws DiSLServerException {
final String CLASS_DELIM = "/"; final String CLASS_DELIM = "/";
final String CLASS_EXT = ".class"; final String CLASS_EXT = ".class";
...@@ -232,10 +232,10 @@ public class Worker extends Thread { ...@@ -232,10 +232,10 @@ public class Worker extends Thread {
fo.close(); fo.close();
} }
catch (FileNotFoundException e) { catch (FileNotFoundException e) {
throw new JboratException(e); throw new DiSLServerException(e);
} }
catch (IOException e) { catch (IOException e) {
throw new JboratException(e); throw new DiSLServerException(e);
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment