Package org.jrd.backend.communication
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 boolean
private String
private final Config
private final String
private final String
private final AgentLoneliness
private final int
private final String
private final boolean
private VirtualMachine
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
InstallDecompilerAgentImpl
(String pid, boolean addToBoot, boolean setPolicy, String host, int port, AgentLoneliness loneliness, String[] properties) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
attach()
attach to the Java process identified by the process id supplied on the command linegetHost()
getPid()
int
getPort()
private void
get the attached process to upload and install the agent jar using whatever agent options were configured on the command linestatic void
install
(String pid, boolean addToBoot, boolean setPolicy, String host, int port, AgentLoneliness loneliness, AgentLiveliness liveliness, String[] properties) private void
toString()
-
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
-