org.jboss.test.util.server
Class Server

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

public class Server
extends Object

A Server.

Version:
$Revision: 57471 $
Author:
Ryan Campbell

Constructor Summary
Server()
           
 
Method Summary
 void addArg(Argument arg)
          Add an argument.
 void addJvmArg(Argument arg)
          Add a jvm arg.
 void addSysProperty(Property property)
          Add a system property.
 String getArgs()
          Get the arguments as a string for the command line.
 String getConfig()
          Get the config.
 File getErrorLog()
          Where should the server's std err log go?
 PrintWriter getErrorWriter()
          The error log's writer.
 String getHost()
          Get the host.
 URL getHttpUrl()
          Where is the HTTP service listening?
 String getJvmArgs()
          Get the JVM args for the command line.
 String getName()
          Get the name.
 File getOutputLog()
          Where should the servers's std out go?
 PrintWriter getOutWriter()
          The writer for the output log.
 Process getProcess()
          Get the process.
 Integer getRmiPort()
          Get the rmiPort
 String getRmiUrl()
          The URl for the RMI listener.
 String getSysProperties()
          Get the system properties for the command line.
 boolean hasWebServer()
          Get the hasWebServer.
 boolean isRunning()
          Is the server actually running?
 boolean isStopped()
          Has the server been intentionally stopped?
 void setConfig(String config)
          Set the config.
 void setErrorWriter(PrintWriter errorlog)
          Set the error writer.
 void setHasWebServer(boolean hasWebServer)
          Set the hasWebServer.
 void setHost(String host)
          Set the host.
 void setHttpPort(Integer httpPort)
          Set the httpPort.
protected  void setManager(ServerManager manager)
          Set the manager.
 void setName(String name)
          Set the name.
 void setOutWriter(PrintWriter outlog)
          Set the output log's writer
 void setProcess(Process process)
          The running process of this server.
 void setRmiPort(Integer rmiPort)
          Set the rmiPort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server()
Method Detail

getName

public String getName()
Get the name.

Returns:
the name.

setName

public void setName(String name)
Set the name.

Parameters:
name - The name to set.

setManager

protected void setManager(ServerManager manager)
Set the manager.

Parameters:
manager -

addArg

public void addArg(Argument arg)
Add an argument.

Parameters:
arg -

getArgs

public String getArgs()
Get the arguments as a string for the command line.

Returns:
the arguments as a string

addJvmArg

public void addJvmArg(Argument arg)
Add a jvm arg.

Parameters:
arg -

getJvmArgs

public String getJvmArgs()
Get the JVM args for the command line.

Returns:
the arguments as a string

addSysProperty

public void addSysProperty(Property property)
Add a system property.

Parameters:
property -

getSysProperties

public String getSysProperties()
Get the system properties for the command line.

Returns:
the properties as a string

setProcess

public void setProcess(Process process)
The running process of this server.

Parameters:
process -

isRunning

public boolean isRunning()
Is the server actually running?

Returns:
whether the server is running

isStopped

public boolean isStopped()
Has the server been intentionally stopped?

Returns:
whether the server is stopped

getProcess

public Process getProcess()
Get the process.

Returns:
the process

getHttpUrl

public URL getHttpUrl()
               throws MalformedURLException
Where is the HTTP service listening?

Returns:
whether the service is listening
Throws:
MalformedURLException - for a malformed url

getRmiUrl

public String getRmiUrl()
The URl for the RMI listener.

Returns:
the rmi url

getConfig

public String getConfig()
Get the config. Defaults to the server name.

Returns:
the config.

setConfig

public void setConfig(String config)
Set the config.

Parameters:
config - The config to set.

getHost

public String getHost()
Get the host.

Returns:
the host.

setHost

public void setHost(String host)
Set the host.

Parameters:
host - The host to set.

setHttpPort

public void setHttpPort(Integer httpPort)
Set the httpPort.

Parameters:
httpPort - The httpPort to set.

setRmiPort

public void setRmiPort(Integer rmiPort)
Set the rmiPort.

Parameters:
rmiPort - The rmiPort to set.

getRmiPort

public Integer getRmiPort()
Get the rmiPort

Returns:
the rmi port

getErrorLog

public File getErrorLog()
Where should the server's std err log go?

Returns:
the error log file

getOutputLog

public File getOutputLog()
Where should the servers's std out go?

Returns:
the output log file

setOutWriter

public void setOutWriter(PrintWriter outlog)
Set the output log's writer

Parameters:
outlog - the log writer

getOutWriter

public PrintWriter getOutWriter()
The writer for the output log.

Returns:
the output writer

getErrorWriter

public PrintWriter getErrorWriter()
The error log's writer.

Returns:
the log writer

setErrorWriter

public void setErrorWriter(PrintWriter errorlog)
Set the error writer.

Parameters:
errorlog -

hasWebServer

public boolean hasWebServer()
Get the hasWebServer.

Returns:
the hasWebServer.

setHasWebServer

public void setHasWebServer(boolean hasWebServer)
Set the hasWebServer.

Parameters:
hasWebServer - The hasWebServer to set.


Copyright © 2004 JBoss Inc. All Rights Reserved.