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.Stringaddressstatic java.lang.StringDEFAULT_ADDRESSstatic intDEFAULT_PORTprivate DelegatingJrdAgent.DelegatingHelperdelegationCandidatesprivate intport
-
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 JrdAgentaddDelegatingAgent(JrdAgent agent)intcleanDelegatingAgents()JrdAgentremoveDelegatingAgent(JrdAgent agent)java.lang.StringsubmitRequest(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:
submitRequestin interfaceDelegatingJrdAgent- Specified by:
submitRequestin 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:
addDelegatingAgentin interfaceDelegatingJrdAgent
-
removeDelegatingAgent
public JrdAgent removeDelegatingAgent(JrdAgent agent)
- Specified by:
removeDelegatingAgentin interfaceDelegatingJrdAgent
-
cleanDelegatingAgents
public int cleanDelegatingAgents()
- Specified by:
cleanDelegatingAgentsin interfaceDelegatingJrdAgent
-
-