public class Instrumentor extends Object
Constructor and Description |
---|
Instrumentor() |
Instrumentor(String address,
int port) |
Instrumentor(String address,
int port,
int rmiPort) |
Instrumentor(Submit submit,
int rmiRegistryPort) |
Modifier and Type | Method and Description |
---|---|
void |
crashAtMethod(String className,
String methodName,
String where)
Inject a Rule to kill the target JVM at a given point within the specified Class.method()
|
void |
crashAtMethodEntry(Class clazz,
String methodName)
Inject a Rule to kill the target JVM upon entry to the specified Class.method()
|
void |
crashAtMethodEntry(String className,
String methodName)
Inject a Rule to kill the target JVM upon entry to the specified Class.method()
|
void |
crashAtMethodExit(Class clazz,
String methodName)
Inject a Rule to kill the target JVM upon exit of the specified Class.method()
|
void |
crashAtMethodExit(String className,
String methodName)
Inject a Rule to kill the target JVM upon exit of the specified Class.method()
|
File |
getRedirectedSubmissionsFile()
Returns the file to which Rule submission is currently redirected
|
void |
injectFault(Class clazz,
String methodName,
Class<? extends Throwable> fault,
Object[] faultArgs)
Inject a fault (i.e.
|
void |
injectOnCall(Class clazz,
String methodName,
String action)
Inject an action to take place upon the invocation of the specified class.method
|
void |
installHelperJar(String path)
Add the specified jar to the remote app's system classpath.
|
InstrumentedClass |
instrumentClass(Class clazz)
Add method tracing rules to the specified class.
|
InstrumentedClass |
instrumentClass(Class clazz,
Set<String> methodNames)
Add method tracing rules to the specified class.
|
void |
removeAllInstrumentation()
Flush any instrumentation for the given class in the remote system and clean up the local cache.
|
void |
removeLocalState()
Flush the local cache of scripts and proxies to remote instrumented classes.
|
void |
setRedirectedSubmissionsFile(File redirectedSubmissionsFile)
Sets the file to which Rule submissions should be redirected.
|
public Instrumentor(Submit submit, int rmiRegistryPort) throws RemoteException
RemoteException
public Instrumentor() throws RemoteException
RemoteException
public Instrumentor(String address, int port) throws RemoteException
RemoteException
public Instrumentor(String address, int port, int rmiPort) throws RemoteException
RemoteException
public void installHelperJar(String path) throws Exception
path
- the absolute path to the .jar file.Exception
- in case of failure.public InstrumentedClass instrumentClass(Class clazz) throws Exception
clazz
- the Class to instrument.Exception
- in case of failure.public InstrumentedClass instrumentClass(Class clazz, Set<String> methodNames) throws Exception
clazz
- the Class to instrument.methodNames
- the selection of methods to instrument.Exception
- in case of failure.public File getRedirectedSubmissionsFile()
public void setRedirectedSubmissionsFile(File redirectedSubmissionsFile)
redirectedSubmissionsFile
- a file, or null to cancel any existing redirection.public void injectOnCall(Class clazz, String methodName, String action) throws Exception
clazz
- The Class in which the injection point resides.methodName
- The method which should be intercepted.action
- The action that should take place upon invocation of the method.Exception
- in case of failure.public void injectFault(Class clazz, String methodName, Class<? extends Throwable> fault, Object[] faultArgs) throws Exception
clazz
- The Class in which the injection point resides.methodName
- The method which should be intercepted.fault
- The type of Exception to be throw. If a checked exception, must be declared thrown by the specified method.faultArgs
- Optional constructor arguments for the Exception.Exception
- in case of failure.public void crashAtMethodExit(Class clazz, String methodName) throws Exception
clazz
- The Class in which the injection point resides.methodName
- The method which should be intercepted.Exception
- in case of failure.public void crashAtMethodExit(String className, String methodName) throws Exception
className
- The name of the Class in which the injection point resides.methodName
- The method which should be intercepted.Exception
- in case of failure.public void crashAtMethodEntry(Class clazz, String methodName) throws Exception
clazz
- The Class in which the injection point resides.methodName
- The method which should be intercepted.Exception
- in case of failure.public void crashAtMethodEntry(String className, String methodName) throws Exception
className
- The name of the Class in which the injection point resides.methodName
- The method which should be intercepted.Exception
- in case of failure.public void crashAtMethod(String className, String methodName, String where) throws Exception
className
- The name of the Class in which the injection point resides.methodName
- The method which should be intercepted.where
- the injection point e.g. "ENTRY".Exception
- in case of failure.public void removeLocalState() throws Exception
Exception
- in case of failure.Copyright © 2013. All Rights Reserved.