fr.dyade.aaa.agent

Class SCAdminHelper


public class SCAdminHelper
extends java.lang.Object

Field Summary

protected Hashtable
ASP
Hashtable that contain all Process of running AgentServer
protected Logger
logmon

Constructor Summary

SCAdminHelper()

Method Summary

void
crashAgentServer(short sid, String host, int port)
Stops violently an agent server from its id.
void
crashAgentServer(short sid, int port)
Stops violently an agent server from its id.
void
destroyAgentServer(short sid)
Kill an agent server and remove it from the ASP table.
int
exitValue(short sid)
Ask for the exit value of an agent server.
int
joinAgentServer(short sid)
Causes the current thread to wait, if necessary, until the process running this agent server has terminated.
void
killAgentServer(short sid)
Kills this agent server process.
String
startAgentServer(short sid)
Starts an agent server from its id.
String
startAgentServer(short sid, File dir, String[] jvmarg)
Starts an agent server from its id.
String
startAgentServer(short sid, File dir, String[] jvmarg, String className, String[] servarg)
Starts an agent server from its id.
String
startAgentServer(short sid, File dir, String[] jvmarg, String[] servarg)
String
startAgentServer(short sid, String[] jvmarg)
Starts an agent server from its id.
void
stopAgentServer(short sid, String host, int port)
Stops cleanly an agent server from its id.
void
stopAgentServer(short sid, int port)
Stops cleanly an agent server from its id.

Field Details

ASP

protected Hashtable ASP
Hashtable that contain all Process of running AgentServer


logmon

protected Logger logmon

Constructor Details

SCAdminHelper

public SCAdminHelper()

Method Details

crashAgentServer

public void crashAgentServer(short sid,
                             String host,
                             int port)
            throws Exception
Stops violently an agent server from its id.

Parameters:
sid - id of agent server to stop
host - hostname of the agent server.
port - port of the corresponding AdminProxy.


crashAgentServer

public void crashAgentServer(short sid,
                             int port)
            throws Exception
Stops violently an agent server from its id.

Parameters:
sid - id of agent server to stop
port - port of the corresponding AdminProxy.


destroyAgentServer

public void destroyAgentServer(short sid)
            throws Exception
Kill an agent server and remove it from the ASP table.

Parameters:
sid - id of agent server to stop


exitValue

public int exitValue(short sid)
            throws IllegalThreadStateException,
                   UnknownServerException
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:
UnknownServerException - if the agent server is unknown.


joinAgentServer

public int joinAgentServer(short sid)
            throws Exception
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.


killAgentServer

public void killAgentServer(short sid)
            throws Exception
Kills this agent server process.

Parameters:
sid - id of agent server to stop


startAgentServer

public String startAgentServer(short sid)
            throws Exception
Starts an agent server from its id.

Parameters:
sid - id of agent server to start


startAgentServer

public String startAgentServer(short sid,
                               File dir,
                               String[] jvmarg)
            throws Exception
Starts an agent server from its id.

Parameters:
sid - id of agent server to start
dir - new working directory for the created agent server, current working directory if null
jvmarg - arguments to pass to the created java program


startAgentServer

public String startAgentServer(short sid,
                               File dir,
                               String[] jvmarg,
                               String className,
                               String[] servarg)
            throws Exception
Starts an agent server from its id.

Parameters:
sid - id of agent server to start
dir - new working directory for the created agent server, current working directory if null
jvmarg - arguments to pass to the created java program
className - the name of the main class
servarg - additional arguments to pass to the created java program


startAgentServer

public String startAgentServer(short sid,
                               File dir,
                               String[] jvmarg,
                               String[] servarg)
            throws Exception


startAgentServer

public String startAgentServer(short sid,
                               String[] jvmarg)
            throws Exception
Starts an agent server from its id.

Parameters:
sid - id of agent server to start
jvmarg - arguments to pass to the created java program


stopAgentServer

public void stopAgentServer(short sid,
                            String host,
                            int port)
            throws Exception
Stops cleanly an agent server from its id.

Parameters:
sid - id of agent server to stop
host - hostname of the agent server.
port - port of the corresponding AdminProxy.


stopAgentServer

public void stopAgentServer(short sid,
                            int port)
            throws Exception
Stops cleanly an agent server from its id.

Parameters:
sid - id of agent server to stop
port - port of the corresponding AdminProxy.


Copyright B) 2004 Scalagent - All rights reserved