Class InstallDecompilerAgentImpl
java.lang.Object
org.jrd.backend.communication.InstallDecompilerAgentImpl
This is Byteman's install library copied, with small modifications. This is
done with permission of Andrew Dinn, author of Byteman. For the original
source of this code, please follow links below:
http://byteman.jboss.org/ -- official page
https://github.com/bytemanproject/byteman -- git repository
This is a provisional solution for the attachment, while I am trying to create
an abstract library to share some functionality.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate Stringprivate final Configprivate final Stringprivate final Stringprivate final AgentLonelinessprivate final intprivate final Stringprivate final booleanprivate VirtualMachine -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInstallDecompilerAgentImpl(String pid, boolean addToBoot, boolean setPolicy, String host, int port, AgentLoneliness loneliness, String[] properties) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidattach()attach to the Java process identified by the process id supplied on the command linegetHost()getPid()intgetPort()private voidget the attached process to upload and install the agent jar using whatever agent options were configured on the command linestatic voidinstall(String pid, boolean addToBoot, boolean setPolicy, String host, int port, AgentLoneliness loneliness, AgentLiveliness liveliness, String[] properties) private voidtoString()
-
Field Details
-
agentJar
-
id
-
port
private final int port -
host
-
addToBoot
private final boolean addToBoot -
setPolicy
private final boolean setPolicy -
props
-
vm
-
loneliness
-
config
-
-
Constructor Details
-
InstallDecompilerAgentImpl
private InstallDecompilerAgentImpl(String pid, boolean addToBoot, boolean setPolicy, String host, int port, AgentLoneliness loneliness, String[] properties)
-
-
Method Details
-
install
public static void install(String pid, boolean addToBoot, boolean setPolicy, String host, int port, AgentLoneliness loneliness, AgentLiveliness liveliness, String[] properties) throws IllegalArgumentException, IOException, AttachNotSupportedException, AgentLoadException, AgentInitializationException -
attach
attach to the Java process identified by the process id supplied on the command line -
injectAgent
get the attached process to upload and install the agent jar using whatever agent options were configured on the command line -
locateAgent
- Throws:
IOException
-
toString
-
getPort
public int getPort() -
getHost
-
getPid
-