org.mortbay.jetty.plus
Class Server

java.lang.Object
  |
  +--org.mortbay.http.HttpServer
        |
        +--org.mortbay.jetty.Server
              |
              +--org.mortbay.jetty.plus.Server
All Implemented Interfaces:
LifeCycle, java.io.Serializable

public class Server
extends Server

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

Author:
Miro Halas
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.mortbay.http.HttpServer
HttpServer.ComponentEvent, HttpServer.ComponentEventListener
 
Constructor Summary
Server()
          Constructor.
Server(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.
 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, addWebApplication, addWebApplication, addWebApplications, addWebApplications, addWebApplications, addWebApplications, configure, getConfiguration, getRootWebApp, 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, setChunkingForced, setContexts, setListeners, setRequestLog, setRequestsPerGC, setResolveRemoteHost, setStatsOn, setTrace, statsReset, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server()
Constructor.


Server

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

Parameters:
configuration - The filename or URL of the XML configuration file.

Server

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

Parameters:
configuration - The filename or URL of the XML configuration file.

Server

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

Parameters:
configuration - The filename or URL of the XML configuration file.
Method Detail

addService

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

Parameters:
service - eg TMService, MailService

start

public void start()
           throws 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.

Specified by:
start in interface LifeCycle
Overrides:
start in class HttpServer
Throws:
MultiException - A collection of exceptions thrown by start() method of subcomponents of the HttpServer.

stop

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

Overrides:
stop in class HttpServer
Parameters:
graceful - If true and statistics are on for a context, then this method will wait for requestsActive to go to zero before stopping that context.
java.lang.InterruptedException

main

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

Parameters:
arg -


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.