Package fr.dyade.aaa.agent
Class SCAdminHelper
- java.lang.Object
-
- fr.dyade.aaa.agent.SCAdminHelper
-
@Deprecated public class SCAdminHelper extends Object
Deprecated.
-
-
Constructor Summary
Constructors Constructor Description SCAdminHelper()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) static voidclose(Socket socket)Deprecated.voidcloseServerStream(Process p)Deprecated.Closes all subsequent streams of the process to avoid deadlock due to limited buffer size.voidcrashAgentServer(short sid, int port)Deprecated.Stops violently an agent server from its id.voidcrashAgentServer(short sid, String host, int port)Deprecated.Stops violently an agent server from its id.voiddestroyAgentServer(short sid)Deprecated.Kill an agent server and remove it from the ASP table.ProcessexecAgentServer(short sid, File dir, String[] jvmargs, String className, String[] args)Deprecated.Runs an agent server from its id and specific parameters.intexitValue(short sid)Deprecated.Ask for the exit value of an agent server.intjoinAgentServer(short sid)Deprecated.Causes the current thread to wait, if necessary, until the process running this agent server has terminated.voidkillAgentServer(short sid)Deprecated.Kills this agent server process.StringstartAgentServer(short sid)Deprecated.Starts an agent server from its id.StringstartAgentServer(short sid, File dir, String[] jvmargs)Deprecated.Starts an agent server from its id using specific jvmargs and storage directory.StringstartAgentServer(short sid, File dir, String[] jvmargs, String[] args)Deprecated.Starts an agent server from its id using specific jvmargs and storage directory.StringstartAgentServer(short sid, File dir, String[] jvmargs, String className, String[] args)Deprecated.Starts an agent server from its id.StringstartAgentServer(short sid, String[] jvmargs)Deprecated.Starts an agent server from its id using specific jvmargs.voidstopAgentServer(short sid, int port)Deprecated.Stops cleanly an agent server from its id.voidstopAgentServer(short sid, String host, int port)Deprecated.Stops cleanly an agent server from its id.StringwaitServerStarting(Process p)Deprecated.Waits for the starting of an AgentServer pointed out by its process.
-
-
-
Method Detail
-
startAgentServer
public String startAgentServer(short sid) throws Exception
Deprecated.Starts an agent server from its id.- Parameters:
sid- id of agent server to start- Returns:
- the status string of the launched server.
- Throws:
Exception- an error occurs.
-
startAgentServer
public String startAgentServer(short sid, String[] jvmargs) throws Exception
Deprecated.Starts an agent server from its id using specific jvmargs.- Parameters:
sid- id of agent server to startjvmargs- arguments to pass to the created java program- Returns:
- the status string of the launched server.
- Throws:
Exception- an error occurs.
-
startAgentServer
public String startAgentServer(short sid, File dir, String[] jvmargs) throws Exception
Deprecated.Starts an agent server from its id using specific jvmargs and storage directory.- Parameters:
sid- id of agent server to startdir- new working directory for the created agent server, current working directory ifnulljvmargs- arguments to pass to the created java program- Returns:
- the status string of the launched server.
- Throws:
Exception- an error occurs.
-
startAgentServer
public String startAgentServer(short sid, File dir, String[] jvmargs, String[] args) throws Exception
Deprecated.Starts an agent server from its id using specific jvmargs and storage directory.- Parameters:
sid- id of agent server to startdir- new working directory for the created agent server, current working directory ifnulljvmargs- arguments to pass to the created java programargs- additional arguments to pass to the created java program- Returns:
- the status string of the launched server.
- Throws:
Exception- an error occurs.
-
startAgentServer
public String startAgentServer(short sid, File dir, String[] jvmargs, String className, String[] args) throws Exception
Deprecated.Starts an agent server from its id.- Parameters:
sid- id of agent server to startdir- new working directory for the created agent server, current working directory ifnulljvmargs- arguments to pass to the created java programclassName- the name of the main classargs- additional arguments to pass to the created java program- Returns:
- the status string of the launched server.
- Throws:
Exception- an error occurs.
-
execAgentServer
public Process execAgentServer(short sid, File dir, String[] jvmargs, String className, String[] args) throws Exception
Deprecated.Runs an agent server from its id and specific parameters.- Parameters:
sid- id of agent server to startdir- new working directory for the created agent server, current working directory ifnulljvmargs- arguments to pass to the created java programclassName- the name of the main classargs- additional arguments to pass to the created java program- Returns:
- the created Process object.
- Throws:
Exception- an error occurs.
-
waitServerStarting
public String waitServerStarting(Process p) throws Exception
Deprecated.Waits for the starting of an AgentServer pointed out by its process.- Parameters:
p- the AgentServer process.- Returns:
- the status string of the launched server.
- Throws:
Exception- an error occurs.
-
closeServerStream
public void closeServerStream(Process p) throws Exception
Deprecated.Closes all subsequent streams of the process to avoid deadlock due to limited buffer size.- Parameters:
p- the AgentServer process.- Throws:
Exception- an error occurs.
-
killAgentServer
public void killAgentServer(short sid) throws ExceptionDeprecated.Kills this agent server process.- Parameters:
sid- id of agent server to stop- Throws:
Exception- an error occurs.
-
joinAgentServer
public int joinAgentServer(short sid) throws ExceptionDeprecated.Causes the current thread to wait, if necessary, until the process running this agent server has terminated.- Parameters:
sid- id of agent server to stop- Returns:
- the exit value of the agent server.
- Throws:
UnknownServerException- if the agent server is unknown.Exception- an error occurs.
-
exitValue
public int exitValue(short sid) throws IllegalThreadStateException, UnknownServerExceptionDeprecated.Ask for the exit value of an agent server.- Parameters:
sid- id of agent server to stop- Returns:
- the exit value of the agent server.
- Throws:
IllegalThreadStateException- if the agent server is still running.UnknownServerException- if the agent server is unknown.
-
destroyAgentServer
public void destroyAgentServer(short sid) throws ExceptionDeprecated.Kill an agent server and remove it from the ASP table.- Parameters:
sid- id of agent server to stop- Throws:
Exception- an error occurs.
-
stopAgentServer
public void stopAgentServer(short sid, int port) throws ExceptionDeprecated.Stops cleanly an agent server from its id.- Parameters:
sid- id of agent server to stopport- port of the corresponding AdminProxy.- Throws:
Exception- an error occurs.
-
stopAgentServer
public void stopAgentServer(short sid, String host, int port) throws ExceptionDeprecated.Stops cleanly an agent server from its id.- Parameters:
sid- id of agent server to stophost- hostname of the agent server.port- port of the corresponding AdminProxy.- Throws:
Exception- an error occurs.
-
crashAgentServer
public void crashAgentServer(short sid, int port) throws ExceptionDeprecated.Stops violently an agent server from its id.- Parameters:
sid- id of agent server to stopport- port of the corresponding AdminProxy.- Throws:
Exception- an error occurs.
-
crashAgentServer
public void crashAgentServer(short sid, String host, int port) throws ExceptionDeprecated.Stops violently an agent server from its id.- Parameters:
sid- id of agent server to stophost- hostname of the agent server.port- port of the corresponding AdminProxy.- Throws:
Exception- an error occurs.
-
close
static void close(Socket socket)
Deprecated.
-
-