public class JettyHttpServer extends Object
| Constructor and Description |
|---|
JettyHttpServer(HttpServerConfiguration configuration,
org.eclipse.jetty.server.Server server,
org.eclipse.jetty.server.handler.HandlerCollection handlers,
org.eclipse.jetty.server.handler.ContextHandlerCollection contexts,
org.eclipse.jetty.servlet.ServletContextHandler rootServletContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addResourceBase(String resourceBaseDir)
Adds a directory for resources such as files containing html, images, etc.
|
void |
addServlet(javax.servlet.Servlet servlet,
String uri)
Adds a servlet to this server.
|
int |
getBusyThreads() |
int |
getCurrentThreads() |
int |
getFreeThreads() |
int |
getIdleThreads() |
int |
getMaxQueuedConnections() |
int |
getMaxThreads() |
int |
getMinThreads() |
int |
getMostThreads() |
int |
getOpenConnections() |
int |
getQueuedConnections() |
long |
getRejectedConnections() |
boolean |
isFailed() |
boolean |
isRunning() |
boolean |
isStarted() |
boolean |
isStarting() |
boolean |
isStopped() |
boolean |
isStopping() |
void |
join() |
void |
start()
Starts the HTTP server.
|
void |
stop()
Stops the HTTP server.
|
public JettyHttpServer(HttpServerConfiguration configuration, org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.handler.HandlerCollection handlers, org.eclipse.jetty.server.handler.ContextHandlerCollection contexts, org.eclipse.jetty.servlet.ServletContextHandler rootServletContext)
public void join()
throws InterruptedException
InterruptedExceptionpublic void start()
throws Exception
Exception - Thrown if there is an error during startpublic void stop()
throws Exception
Exception - Thrown if there is an error during stoppublic void addResourceBase(String resourceBaseDir)
resourceBaseDir - The directory containing resources (basically the
web root)public void addServlet(javax.servlet.Servlet servlet,
String uri)
servlet - The servlet to adduri - The uri mapping (relative to root context /) to trigger this
servlet to be executed. Wildcards are permitted.public boolean isFailed()
public boolean isRunning()
public boolean isStarted()
public boolean isStarting()
public boolean isStopped()
public boolean isStopping()
public int getBusyThreads()
public int getCurrentThreads()
public int getIdleThreads()
public int getMaxThreads()
public int getMinThreads()
public int getMostThreads()
public int getFreeThreads()
public long getRejectedConnections()
public int getMaxQueuedConnections()
public int getQueuedConnections()
public int getOpenConnections()
Copyright © 2012–2016 Cloudhopper by Twitter. All rights reserved.