org.jboss.test.util.server
Class ServerManager

java.lang.Object
  extended by org.jboss.test.util.server.ServerManager

public class ServerManager
extends Object

A ServerManager.

Version:
$Revision: 56504 $
Author:
Ryan Campbell

Constructor Summary
ServerManager()
          Create a new ServerManager.
 
Method Summary
 void addServer(Server newServer)
          Add a server
 String getJavaExecutable()
          Get the jvm.
 String getJBossHome()
          Get the jboss home.
 Server getServer(String name)
          Get the server by name.
 int getShutdownTimeout()
          How long to wait (in seconds) for a server to shutdown
protected  String getStartClasspath()
          The classpath to run the server
 int getStartupTimeout()
          How long to wait (in seconds) for a server to startup
protected  String getStopClasspath()
          The classpath used to stop the server.
protected  String getUdpGroup()
          Get the udpGroup.
 void setJavaHome(String javaHome)
          Set the javaHome.
 void setJbossHome(String jbossHome)
           
 void setJvm(String jvm)
          Set the jvm.
 void setUdpGroup(String udpGroup)
          Set the udpGroup.
 void startServer(String serverName)
          Start the named server.
 void stopServer(String name)
          Stop the named server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerManager

public ServerManager()
Create a new ServerManager. Make sure all servers are killed on shutdown.

Method Detail

addServer

public void addServer(Server newServer)
Add a server

Parameters:
newServer -

getServer

public Server getServer(String name)
Get the server by name. Can't use a hashmap because of Ant.

Parameters:
name - the name of the server
Returns:
the server

startServer

public void startServer(String serverName)
                 throws IOException
Start the named server.

Parameters:
serverName -
Throws:
IOException

stopServer

public void stopServer(String name)
                throws IOException
Stop the named server

Parameters:
name -
Throws:
IOException

getJavaExecutable

public String getJavaExecutable()
                         throws IOException
Get the jvm.

Returns:
the jvm.
Throws:
IOException

setJvm

public void setJvm(String jvm)
Set the jvm.

Parameters:
jvm - The jvm to set.

setJavaHome

public void setJavaHome(String javaHome)
Set the javaHome.

Parameters:
javaHome - The javaHome to set.

setJbossHome

public void setJbossHome(String jbossHome)
Parameters:
jbossHome - The jBossHome to set.

getStartClasspath

protected String getStartClasspath()
The classpath to run the server

Returns:
the classpath as a string

getStopClasspath

protected String getStopClasspath()
The classpath used to stop the server.

Returns:
the string to put on the classpath

getJBossHome

public String getJBossHome()
Get the jboss home.

Returns:
the home directory as a string

getShutdownTimeout

public int getShutdownTimeout()
How long to wait (in seconds) for a server to shutdown

Returns:
the shutdown timeout

getStartupTimeout

public int getStartupTimeout()
How long to wait (in seconds) for a server to startup

Returns:
the startup timeout

getUdpGroup

protected String getUdpGroup()
Get the udpGroup.

Returns:
the udpGroup.

setUdpGroup

public void setUdpGroup(String udpGroup)
Set the udpGroup.

Parameters:
udpGroup - The udpGroup to set.


Copyright © 2004 JBoss Inc. All Rights Reserved.