Class SCAdminHelper

    • Field Detail

      • logger

        private static final Logger logger
        Deprecated.
      • DEBUG

        private static final boolean DEBUG
        Deprecated.
      • ASP

        protected Hashtable<Short,​Process> ASP
        Deprecated.
        Hashtable that contain all Process of running AgentServer
    • Constructor Detail

      • SCAdminHelper

        public SCAdminHelper()
        Deprecated.
    • 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 start
        jvmargs - 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 start
        dir - new working directory for the created agent server, current working directory if null
        jvmargs - 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 start
        dir - new working directory for the created agent server, current working directory if null
        jvmargs - arguments to pass to the created java program
        args - 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 start
        dir - new working directory for the created agent server, current working directory if null
        jvmargs - arguments to pass to the created java program
        className - the name of the main class
        args - 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 start
        dir - new working directory for the created agent server, current working directory if null
        jvmargs - arguments to pass to the created java program
        className - the name of the main class
        args - 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 Exception
        Deprecated.
        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 Exception
        Deprecated.
        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.
      • destroyAgentServer

        public void destroyAgentServer​(short sid)
                                throws Exception
        Deprecated.
        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 Exception
        Deprecated.
        Stops cleanly an agent server from its id.
        Parameters:
        sid - id of agent server to stop
        port - port of the corresponding AdminProxy.
        Throws:
        Exception - an error occurs.
      • stopAgentServer

        public void stopAgentServer​(short sid,
                                    String host,
                                    int port)
                             throws Exception
        Deprecated.
        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.
        Throws:
        Exception - an error occurs.
      • crashAgentServer

        public void crashAgentServer​(short sid,
                                     int port)
                              throws Exception
        Deprecated.
        Stops violently an agent server from its id.
        Parameters:
        sid - id of agent server to stop
        port - port of the corresponding AdminProxy.
        Throws:
        Exception - an error occurs.
      • crashAgentServer

        public void crashAgentServer​(short sid,
                                     String host,
                                     int port)
                              throws Exception
        Deprecated.
        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.
        Throws:
        Exception - an error occurs.
      • close

        static void close​(Socket socket)
        Deprecated.