public class Server extends Server
Constructor and Description |
---|
Server()
Constructor.
|
Server(Resource configuration)
Constructor.
|
Server(java.lang.String configuration)
Constructor.
|
Server(java.net.URL configuration)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addService(Service service)
Add a Service to a Server.
|
protected void |
doStart()
Start all handlers then listeners.
|
protected void |
doStop()
Stop all listeners then all contexts.
|
static void |
main(java.lang.String[] arg) |
protected WebApplicationContext |
newWebApplicationContext(java.lang.String webApp)
Create a new WebApplicationContext.
|
addWebApplication, addWebApplication, addWebApplications, addWebApplications, addWebApplications, addWebApplications, addWebApplications, configure, getConfiguration, getRootWebApp, getStopAtShutdown, getWebApplicationConfigurationClassNames, newHttpContext, setRootWebApp, setStopAtShutdown, setWebApplicationConfigurationClassNames
addContext, addContext, addContext, addContext, addHostAlias, addListener, addListener, addListener, addRealm, destroy, 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, removeContext, removeListener, removeRealm, save, service, setAnonymous, setContexts, setListeners, setRequestLog, setRequestsPerGC, setResolveRemoteHost, setServerClasses, setStatsOn, setStopGracefully, setSystemClasses, setTrace, statsReset, stop
addComponent, addEventListener, getComponents, isFailed, isStarted, isStarting, isStopping, removeComponent, removeEventListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEventListener, removeEventListener
public Server()
public Server(java.lang.String configuration) throws java.io.IOException
configuration
- The filename or URL of the XML
configuration file.java.io.IOException
public Server(Resource configuration) throws java.io.IOException
configuration
- The filename or URL of the XML
configuration file.java.io.IOException
public Server(java.net.URL configuration) throws java.io.IOException
configuration
- The filename or URL of the XML
configuration file.java.io.IOException
public void addService(Service service)
service
- eg TMService, MailServiceprotected void doStart() throws java.lang.Exception
doStart
in class HttpServer
MultiException
- A collection of exceptions thrown by
start() method of subcomponents of the HttpServer.java.lang.Exception
protected void doStop() throws java.lang.InterruptedException
doStop
in class HttpServer
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
- If interrupted, stop may not have
been called on everything.public static void main(java.lang.String[] arg)
protected WebApplicationContext newWebApplicationContext(java.lang.String webApp)
newWebApplicationContext
in class Server
webApp
- The Web application directory or WAR file.Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.