Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.jetty.plus
Class Server  view Server download Server.java

java.lang.Object
  extended byorg.mortbay.http.HttpServer
      extended byorg.mortbay.jetty.Server
          extended byorg.mortbay.jetty.plus.Server
All Implemented Interfaces:
org.mortbay.util.LifeCycle, java.io.Serializable

public class Server
extends org.mortbay.jetty.Server

The Jetty HttpServer. This specialization of org.mortbay.jetty.Server adds knowledge about JNDI and Transaction Management


Nested Class Summary
 
Nested classes inherited from class org.mortbay.http.HttpServer
org.mortbay.http.HttpServer.ComponentEvent, org.mortbay.http.HttpServer.ComponentEventListener
 
Field Summary
private  java.util.ArrayList _serviceList
           
(package private) static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.mortbay.jetty.Server
 
Fields inherited from class org.mortbay.http.HttpServer
 
Constructor Summary
Server()
          Constructor.
Server(org.mortbay.util.Resource configuration)
          Constructor.
Server(java.lang.String configuration)
          Constructor.
Server(java.net.URL configuration)
          Constructor.
 
Method Summary
 void addService(Service service)
          Add a Service to a Server.
static void main(java.lang.String[] arg)
          Construct server from command line arguments.
protected  org.mortbay.jetty.servlet.WebApplicationContext newWebApplicationContext(java.lang.String webApp)
          Create a new WebApplicationContext.
 void start()
          Start all handlers then listeners.
 void stop(boolean graceful)
          Stop all listeners then all contexts.
 
Methods inherited from class org.mortbay.jetty.Server
addWebApplication, addWebApplication, addWebApplications, addWebApplications, addWebApplications, addWebApplications, addWebApplications, configure, getConfiguration, getRootWebApp, newHttpContext, setRootWebApp
 
Methods inherited from class org.mortbay.http.HttpServer
addContext, addContext, addContext, addContext, addEventListener, addHostAlias, addListener, addListener, addListener, addRealm, destroy, findHandler, getConnections, getConnectionsDurationAve, getConnectionsDurationMax, getConnectionsOpen, getConnectionsOpenMax, getConnectionsRequestsAve, getConnectionsRequestsMax, getContext, getContext, getContext, getContexts, getErrors, getHostMap, getHttpServerList, getHttpServers, getListeners, getRealm, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getRequestsDurationAve, getRequestsDurationMax, getRequestsPerGC, getResolveRemoteHost, getStatsOn, getStatsOnMs, getTrace, isStarted, join, removeContext, removeEventListener, removeListener, removeRealm, save, service, setAnonymous, setContexts, setListeners, setRequestLog, setRequestsPerGC, setResolveRemoteHost, setStatsOn, setTrace, statsReset, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static org.apache.commons.logging.Log log

_serviceList

private java.util.ArrayList _serviceList
Constructor Detail

Server

public Server()
Constructor.


Server

public Server(java.lang.String configuration)
       throws java.io.IOException
Constructor.


Server

public Server(org.mortbay.util.Resource configuration)
       throws java.io.IOException
Constructor.


Server

public Server(java.net.URL configuration)
       throws java.io.IOException
Constructor.

Method Detail

addService

public void addService(Service service)
Add a Service to a Server. Examples are transaction service, mail service etc


start

public void start()
           throws org.mortbay.util.MultiException
Start all handlers then listeners. If a subcomponent fails to start, it's exception is added to a org.mortbay.util.MultiException and the start method continues.


stop

public void stop(boolean graceful)
          throws java.lang.InterruptedException
Stop all listeners then all contexts.


main

public static void main(java.lang.String[] arg)
Description copied from class: org.mortbay.http.HttpServer
Construct server from command line arguments.


newWebApplicationContext

protected org.mortbay.jetty.servlet.WebApplicationContext newWebApplicationContext(java.lang.String webApp)
Create a new WebApplicationContext. Ths method is called by Server to creat new contexts for web applications. Thus calls to addWebApplication that result in a new Context being created will return an correct class instance. Derived class can override this method to create instance of its own class derived from WebApplicationContext in case it needs more functionality.