org.mortbay.jetty.plugin
Class JettyServer

java.lang.Object
  extended by org.eclipse.jetty.util.component.AbstractLifeCycle
      extended by org.eclipse.jetty.server.handler.AbstractHandler
          extended by org.eclipse.jetty.server.handler.AbstractHandlerContainer
              extended by org.eclipse.jetty.server.handler.HandlerWrapper
                  extended by org.eclipse.jetty.server.Server
                      extended by org.mortbay.jetty.plugin.JettyServer
All Implemented Interfaces:
org.eclipse.jetty.server.Handler, org.eclipse.jetty.server.HandlerContainer, org.eclipse.jetty.util.Attributes, org.eclipse.jetty.util.component.LifeCycle

public class JettyServer
extends org.eclipse.jetty.server.Server

JettyServer Maven jetty plugin version of a wrapper for the Server class.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jetty.server.Server
org.eclipse.jetty.server.Server.Graceful
 
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener
 
Field Summary
static int DEFAULT_MAX_IDLE_TIME
           
static int DEFAULT_PORT
           
 
Fields inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
_handler
 
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
Constructor Summary
JettyServer()
           
 
Method Summary
 void addWebApplication(org.eclipse.jetty.webapp.WebAppContext webapp)
           
 void configureHandlers()
          Set up the handler structure to receive a webapp.
 org.eclipse.jetty.server.Connector createDefaultConnector(java.lang.String portnum)
           
 void doStart()
           
 void setRequestLog(org.eclipse.jetty.server.RequestLog requestLog)
           
 
Methods inherited from class org.eclipse.jetty.server.Server
addBean, addConnector, addLifeCycle, clearAttributes, doStop, dump, getAttribute, getAttributeNames, getBean, getBeans, getConnectors, getContainer, getGracefulShutdown, getMaxCookieVersion, getSendDateHeader, getSendServerVersion, getSessionIdManager, getStopAtShutdown, getThreadPool, getVersion, handle, handleAsync, join, main, removeAttribute, removeBean, removeConnector, removeLifeCycle, setAttribute, setConnectors, setGracefulShutdown, setMaxCookieVersion, setSendDateHeader, setSendServerVersion, setSessionIdManager, setStopAtShutdown, setThreadPool, toString
 
Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
expandChildren, getHandler, getHandlers, getNestedHandlerByClass, handle, setHandler, setServer
 
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
dumpHandlers, expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
 
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
destroy, dump, dump, getServer
 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 

Field Detail

DEFAULT_PORT

public static int DEFAULT_PORT

DEFAULT_MAX_IDLE_TIME

public static int DEFAULT_MAX_IDLE_TIME
Constructor Detail

JettyServer

public JettyServer()
Method Detail

setRequestLog

public void setRequestLog(org.eclipse.jetty.server.RequestLog requestLog)

doStart

public void doStart()
             throws java.lang.Exception
Overrides:
doStart in class org.eclipse.jetty.server.Server
Throws:
java.lang.Exception
See Also:
Server.doStart()

addWebApplication

public void addWebApplication(org.eclipse.jetty.webapp.WebAppContext webapp)
                       throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
HandlerCollection.addHandler(org.eclipse.jetty.server.Handler)

configureHandlers

public void configureHandlers()
                       throws java.lang.Exception
Set up the handler structure to receive a webapp. Also put in a DefaultHandler so we get a nice page than a 404 if we hit the root and the webapp's context isn't at root.

Throws:
java.lang.Exception

createDefaultConnector

public org.eclipse.jetty.server.Connector createDefaultConnector(java.lang.String portnum)
                                                          throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.