com.sun.faban.harness.logging
Class LogServer

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.faban.harness.logging.LogServer
All Implemented Interfaces:
Runnable

public class LogServer
extends Thread

Startup class for LogServer.

Author:
Akara Sucharitakul

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 LogConfig config
          The log configuration.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LogServer(LogConfig conf)
          Constructs the server.
 
Method Summary
 void listen()
          Causes the server to listen to incoming requests.
 void run()
          The run method starts the server.
 void shutdown()
          This method stops the server.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

config

public LogConfig config
The log configuration.

Constructor Detail

LogServer

public LogServer(LogConfig conf)
          throws IOException
Constructs the server. This will setup all server facilities. If only one listener thread is configured, the main thread will act as the listener thread. Otherwise additional listener threads are started.

Parameters:
conf - The singleton config object
Throws:
IOException - The log server cannot bind socket
Method Detail

listen

public void listen()
Causes the server to listen to incoming requests.


run

public void run()
The run method starts the server.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

shutdown

public void shutdown()
This method stops the server.