com.sun.faban.harness.engine
Class LighttpdService

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

Deprecated.

@Deprecated
public final class LighttpdService
extends Object
implements WebServerService

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

Author:
Shanti Subramanyam

Method Summary
 boolean clearLogs()
          Deprecated. Clear server logs and session files.
static GregorianCalendar getGregorianCalendar(String hostName)
          Deprecated. Obtains the gregorian calendar representing the current time.
static LighttpdService getHandle()
          Deprecated. Get the reference to the singleton object.
 void kill()
          Deprecated. Kill all 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 log files to the master.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandle

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

Returns:
LighttpdService - 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 web server machines.
binDir - - lighttpd binary location
logsDir - - lighttpd logs location
confDir - - lighttpd conf file location
pidDir - - lighttpd.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 server logs and session files. Clears access log, error log, pidfile 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 log files to the master. 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 servers. We simply stop them instead of doing a hard kill.

Specified by:
kill in interface WebServerService