|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.clients.jobagent.AgentController
public class AgentController
This is the command line controller class for the job agent application. It is responsible for starting up and managing a running job agent. The agent itself will be started in separate thread.
Field Summary | |
---|---|
private static Logger |
log
Log job agent events. |
private int |
port
|
private Properties |
properties
|
private int |
timeout
|
Constructor Summary | |
---|---|
AgentController(Properties p)
Create a new controller for controlling the job agent specified by the given properties. |
Method Summary | |
---|---|
private Agent |
createAgent(Properties p)
|
JobAgentInfo |
getInfo()
Get info about running job agent by sending an info request to the agents remote control service. |
JobAgentInfo |
getStatus()
Get status info about running job agent by sending an info request to the agents r emote control service. |
static void |
main(String[] args)
|
void |
pauseAgent()
Pause a running job agent by sending a stop request to the agents remote control service. |
private static void |
printHelp()
|
private static void |
printUsage()
|
void |
registerAgent()
|
void |
startAgent()
Start the agent this controller is controlling. |
void |
stopAgent()
Stop a running job agent by sending a stop request to the agents remote control service. |
void |
unregisterAgent()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger log
private final Properties properties
private final int port
private final int timeout
Constructor Detail |
---|
public AgentController(Properties p)
p
- The properties for the job agent to controlMethod Detail |
---|
public static void main(String[] args)
private static void printUsage()
private static void printHelp()
public void startAgent() throws IOException
IOException
- If there is an errorJobAgentConnection.sendStart()
public void stopAgent() throws IOException
IOException
- If there is an errorJobAgentConnection.sendStop()
public void pauseAgent() throws IOException
IOException
- If there is an errorJobAgentConnection.sendPause()
public JobAgentInfo getInfo() throws IOException
JobAgentInfo
object
IOException
- If there is an errorJobAgentConnection.getInfo(boolean)
public JobAgentInfo getStatus() throws IOException
JobAgentInfo
object
IOException
- If there is an errorJobAgentConnection.getInfo(boolean)
public void registerAgent()
public void unregisterAgent()
private Agent createAgent(Properties p)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |