Package aQute.remote.util
Class AgentSupervisor<Supervisor,Agent>
java.lang.Object
aQute.remote.util.AgentSupervisor<Supervisor,Agent>
- Type Parameters:
Supervisor- The supervisor typeAgent- The agent type
This is a base class that provides the basic functionality of a supervisor.
In general an actual supervisor extends this class to provide the
functionality to use on the client side.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidconnect(Class<Agent> agent, Supervisor supervisor, String host, int port) protected voidconnect(Class<Agent> agent, Supervisor supervisor, String host, int port, int timeout) protected voidexit(int exitCode) getAgent()byte[]booleanisOpen()intjoin()voidsetAgent(Link<Supervisor, Agent> link)
-
Field Details
-
exitCode
protected volatile int exitCode
-
-
Constructor Details
-
AgentSupervisor
public AgentSupervisor()
-
-
Method Details
-
connect
protected void connect(Class<Agent> agent, Supervisor supervisor, String host, int port) throws Exception - Throws:
Exception
-
connect
protected void connect(Class<Agent> agent, Supervisor supervisor, String host, int port, int timeout) throws Exception - Throws:
Exception
-
getFile
- Throws:
Exception
-
setAgent
-
close
- Throws:
IOException
-
join
- Throws:
InterruptedException
-
exit
protected void exit(int exitCode) -
getAgent
-
addFile
- Throws:
NoSuchAlgorithmExceptionException
-
isOpen
public boolean isOpen()
-