org.mortbay.jetty.plus
Class Server
- EventProvider, LifeCycle, Serializable
The Jetty HttpServer.
This specialization of org.mortbay.jetty.Server adds knowledge
about JNDI and Transaction Management
addWebApplication , addWebApplication , addWebApplications , addWebApplications , addWebApplications , addWebApplications , addWebApplications , configure , getConfiguration , getRootWebApp , getStopAtShutdown , getWebApplicationConfigurationClassNames , main , newHttpContext , newWebApplicationContext , setRootWebApp , setStopAtShutdown , setWebApplicationConfigurationClassNames |
addContext , addContext , addContext , addContext , addHostAlias , addListener , addListener , addListener , addRealm , destroy , doStart , doStop , findHandler , getConnections , getConnectionsDurationAve , getConnectionsDurationMax , getConnectionsDurationMin , getConnectionsDurationTotal , getConnectionsOpen , getConnectionsOpenMax , getConnectionsOpenMin , getConnectionsRequestsAve , getConnectionsRequestsMax , getConnectionsRequestsMin , getContext , getContext , getContext , getContexts , getErrors , getHostMap , getHttpServerList , getHttpServers , getListeners , getRealm , getRequestLog , getRequests , getRequestsActive , getRequestsActiveMax , getRequestsActiveMin , getRequestsDurationAve , getRequestsDurationMax , getRequestsDurationMin , getRequestsDurationTotal , getRequestsPerGC , getResolveRemoteHost , getServerClasses , getStatsOn , getStatsOnMs , getStopGracefully , getSystemClasses , getTrace , join , main , newHttpContext , removeContext , removeListener , removeRealm , save , service , setAnonymous , setContexts , setListeners , setRequestLog , setRequestsPerGC , setResolveRemoteHost , setServerClasses , setStatsOn , setStopGracefully , setSystemClasses , setTrace , statsReset , stop |
addComponent , addEventListener , destroy , doStart , doStop , getComponents , isStarted , isStarting , isStopping , removeComponent , removeEventListener , start , stop |
Server
public Server()
Constructor.
Server
public Server(String configuration)
throws IOException
Constructor.
configuration
- The filename or URL of the XML
configuration file.
Server
public Server(URL configuration)
throws IOException
Constructor.
configuration
- The filename or URL of the XML
configuration file.
Server
public Server(Resource configuration)
throws IOException
Constructor.
configuration
- The filename or URL of the XML
configuration file.
addService
public void addService(Service service)
Add a Service to a Server. Examples are transaction service,
mail service etc
service
- eg TMService, MailService
doStart
protected void doStart()
throws Exception
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.
- doStart in interface HttpServer
doStop
protected void doStop()
throws InterruptedException
Stop all listeners then all contexts.
- doStop in interface HttpServer
main
public static void main(String[] arg)
Construct server from command line arguments.
- main in interface Server
newWebApplicationContext
protected WebApplicationContext newWebApplicationContext(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.
- newWebApplicationContext in interface Server
webApp
- The Web application directory or WAR file.
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.