Package org.jrd.backend.communication
Class CallDecompilerAgent
- java.lang.Object
-
- org.jrd.backend.communication.CallDecompilerAgent
-
- All Implemented Interfaces:
DelegatingJrdAgent
,JrdAgent
public class CallDecompilerAgent extends java.lang.Object implements DelegatingJrdAgent
This class is handling opening of communication socket and request submitting.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jrd.backend.communication.DelegatingJrdAgent
DelegatingJrdAgent.CommandDelegationOptions, DelegatingJrdAgent.DelegatingHelper
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
address
static java.lang.String
DEFAULT_ADDRESS
static int
DEFAULT_PORT
private DelegatingJrdAgent.DelegatingHelper
delegationCandidates
private int
port
-
Constructor Summary
Constructors Constructor Description CallDecompilerAgent(int port, java.lang.String host)
Constructor of the object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JrdAgent
addDelegatingAgent(JrdAgent agent)
int
cleanDelegatingAgents()
JrdAgent
removeDelegatingAgent(JrdAgent agent)
java.lang.String
submitRequest(java.lang.String request)
Opens a socket and sends the request to the agent via socket.
-
-
-
Field Detail
-
DEFAULT_ADDRESS
public static final java.lang.String DEFAULT_ADDRESS
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
port
private final int port
-
address
private final java.lang.String address
-
delegationCandidates
private final DelegatingJrdAgent.DelegatingHelper delegationCandidates
-
-
Method Detail
-
submitRequest
public java.lang.String submitRequest(java.lang.String request)
Opens a socket and sends the request to the agent via socket.- Specified by:
submitRequest
in interfaceDelegatingJrdAgent
- Specified by:
submitRequest
in interfaceJrdAgent
- Parameters:
request
- either "CLASSES" or "BYTES \n className", other formats are refused- Returns:
- agents response or null
-
addDelegatingAgent
public JrdAgent addDelegatingAgent(JrdAgent agent)
- Specified by:
addDelegatingAgent
in interfaceDelegatingJrdAgent
-
removeDelegatingAgent
public JrdAgent removeDelegatingAgent(JrdAgent agent)
- Specified by:
removeDelegatingAgent
in interfaceDelegatingJrdAgent
-
cleanDelegatingAgents
public int cleanDelegatingAgents()
- Specified by:
cleanDelegatingAgents
in interfaceDelegatingJrdAgent
-
-