net.databinder.web
Class DataServer

java.lang.Object
  extended by net.databinder.web.DataServer
Direct Known Subclasses:
ClusterServer

public class DataServer
extends java.lang.Object

Optional starter class for embedded Jetty. Client applications may pass this classname to the Java runtime to serve with no other configuration. The webroot defaults to src/main/webapp, and the server to a context named after the project directory with HTTP on port 8080. jetty.warpath, jetty.contextpath, jetty.port, and jetty.ajp.port system properties may be used to override (e.g. -Djetty.port=80 as a command line parameter). AJP is enabled by specifying a port, and HTTP disabled by setting jetty.port to 0.

Some customization can be accomplished by extending this class and overriding the configure(Server, WebAppContext) method. The subclass will need a static main(args) method that constructs an instance of itself, similar to main(String[])

Author:
Nathan Hamblen

Constructor Summary
DataServer()
          Starts web sever using any parameters supplied.
 
Method Summary
protected  void configure(org.mortbay.jetty.Server server, org.mortbay.jetty.webapp.WebAppContext context)
          Override to customize the server and context objects.
static void main(java.lang.String[] args)
          Constructs DataServer, kicking off server.
protected  void stopped(org.mortbay.jetty.Server server, org.mortbay.jetty.webapp.WebAppContext context)
          Override to perform action after server stops
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataServer

public DataServer()
Starts web sever using any parameters supplied. Calls {DataServerconfigure(Server, WebAppContext) immediately before starting server.

Method Detail

main

public static void main(java.lang.String[] args)
Constructs DataServer, kicking off server.


configure

protected void configure(org.mortbay.jetty.Server server,
                         org.mortbay.jetty.webapp.WebAppContext context)
                  throws java.lang.Exception
Override to customize the server and context objects.

Throws:
java.lang.Exception
See Also:
DataServer()

stopped

protected void stopped(org.mortbay.jetty.Server server,
                       org.mortbay.jetty.webapp.WebAppContext context)
                throws java.lang.Exception
Override to perform action after server stops

Throws:
java.lang.Exception
See Also:
DataServer()


Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.