org.alicebot.server.net
Class JettyWrapper

java.lang.Object
  extended by org.alicebot.server.net.JettyWrapper
All Implemented Interfaces:
java.lang.Runnable, BotProcess, AliceCompatibleHttpServer

public class JettyWrapper
extends java.lang.Object
implements AliceCompatibleHttpServer

Implements a "wrapper" for Jetty 3.1.4 so it can be created with a parameterless constructor and then initialized with a configuration file.

Author:
Noel Bush

Constructor Summary
JettyWrapper()
           
 
Method Summary
 void configure(java.lang.String configFilePath)
          Configures the server and sets the address and port number in Globals (for reference).
 org.mortbay.jetty.Server getServer()
           
 void run()
          Starts the http server.
 void shutdown()
          Shuts down the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JettyWrapper

public JettyWrapper()
Method Detail

configure

public void configure(java.lang.String configFilePath)
               throws java.io.IOException
Configures the server and sets the address and port number in Globals (for reference).

Specified by:
configure in interface AliceCompatibleHttpServer
Parameters:
configFilePath - the config file path to pass to Jetty
Throws:
java.io.IOException - if the configuration file cannot be read

run

public void run()
Description copied from interface: AliceCompatibleHttpServer
Starts the http server.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface AliceCompatibleHttpServer

shutdown

public void shutdown()
Description copied from interface: BotProcess
Shuts down the process.

Specified by:
shutdown in interface BotProcess

getServer

public org.mortbay.jetty.Server getServer()