org.jboss.jbossas.servermanager
Class ServerController

java.lang.Object
  extended by org.jboss.jbossas.servermanager.ServerController

public abstract class ServerController
extends Object

Starts, stops, and (eventually) reboots server instances.

Version:
$Revision: 82586 $
Author:
Ryan Campbell

Method Summary
static boolean isServerStarted(Server server)
          Check if the server is fully intialized by trying to open a connection to tomcat.
static void startServer(Server server, ServerManager manager)
          Start the server and pump its output and error streams.
static void stopServer(Server server, ServerManager manager)
          Stop the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

startServer

public static void startServer(Server server,
                               ServerManager manager)
                        throws IOException
Start the server and pump its output and error streams.

Parameters:
server -
manager -
Throws:
IOException

isServerStarted

public static boolean isServerStarted(Server server)
                               throws IOException
Check if the server is fully intialized by trying to open a connection to tomcat.

Parameters:
server - the server
Returns:
whether it is started
Throws:
IOException - for any error

stopServer

public static void stopServer(Server server,
                              ServerManager manager)
                       throws IOException
Stop the server. Get thread dump and Process.destroy() the server if it fails to shutdown.

Parameters:
server -
manager -
Throws:
IOException


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.