com.sun.faban.harness.engine
Class ApacheHttpdService

java.lang.Object
  extended by com.sun.faban.harness.engine.ApacheHttpdService
All Implemented Interfaces:
WebServerService

Deprecated.

@Deprecated
public final class ApacheHttpdService
extends Object
implements WebServerService

This class implements the service to start/stop ApacheHttpd instances. It also provides functionality to transfer the portion of the apache error_log for a run to the run output directory. It can be used by any Apache benchmark to manage apache servers and perform these operations remotely using this Service.

Author:
Shanti Subramanyam

Method Summary
 boolean clearLogs()
          Deprecated. Clear apache logs and session files.
static GregorianCalendar getGregorianCalendar(String hostName)
          Deprecated. Obtains the gregorian calendar representing the current time.
static ApacheHttpdService getHandle()
          Deprecated. Get the reference to the singleton object.
 void kill()
          Deprecated. Kill all ApacheHttpd servers.
 boolean restartServers()
          Deprecated. Restart all servers.
 void setup(String[] serverMachines, String binDir, String logsDir, String confDir, String pidDir)
          Deprecated. The setup method is called to set up a benchmark run.
 boolean startServers()
          Deprecated. Start all apache servers on configured hosts.
 boolean stopServers()
          Deprecated. Stop servers.
 void xferLogs(int totalRunTime)
          Deprecated. Transfer the log files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandle

public static ApacheHttpdService getHandle()
Deprecated. 
Get the reference to the singleton object. Use this method to get access to the service.

Returns:
ApacheHttpdService - service object handle

setup

public void setup(String[] serverMachines,
                  String binDir,
                  String logsDir,
                  String confDir,
                  String pidDir)
Deprecated. 
The setup method is called to set up a benchmark run. It is assumed that all servers have the same installation directory

Specified by:
setup in interface WebServerService
Parameters:
serverMachines - - array specifying the apache server machines.
binDir - - Apache binaries location
logsDir - - Apache logs location
confDir - - Apache httpd.conf file location
pidDir - - Apache httpd.pid file location

startServers

public boolean startServers()
Deprecated. 
Start all apache servers on configured hosts.

Specified by:
startServers in interface WebServerService
Returns:
boolean true if start succeeded on all machines, else false

restartServers

public boolean restartServers()
Deprecated. 
Restart all servers. It first stops servers, clear logs and then attempts to start them up again. If startup fails on any server, it will stop all servers and cleanup.

Specified by:
restartServers in interface WebServerService
Returns:
true if all servers restarted successfully, otherwise false

stopServers

public boolean stopServers()
Deprecated. 
Stop servers.

Specified by:
stopServers in interface WebServerService
Returns:
true if stop succeeded on all machines, else false

clearLogs

public boolean clearLogs()
Deprecated. 
Clear apache logs and session files. It assumes that session files are in /tmp/sess*.

Specified by:
clearLogs in interface WebServerService
Returns:
true if operation succeeded, else fail

xferLogs

public void xferLogs(int totalRunTime)
Deprecated. 
Transfer the log files. This method copies over the error_log to the run output directory and keeps only the portion of the log relevant for this run

Specified by:
xferLogs in interface WebServerService
Parameters:
totalRunTime - - the time in seconds for this run

getGregorianCalendar

public static GregorianCalendar getGregorianCalendar(String hostName)
                                              throws Exception
Deprecated. 
Obtains the gregorian calendar representing the current time.

Parameters:
hostName - The host name to get the calendar from
Returns:
The calendar
Throws:
Exception - Error obtaining calendar

kill

public void kill()
Deprecated. 
Kill all ApacheHttpd servers. We simply stop them instead of doing a hard kill.

Specified by:
kill in interface WebServerService