public class JettyHTTPD
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
JettyHTTPD.AuthenticationHandler |
class |
JettyHTTPD.GateHandler |
Constructor and Description |
---|
JettyHTTPD()
Create bare Jetty object.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptRequests() |
protected void |
createServer(org.eclipse.jetty.server.Connector connector) |
static void |
endTransaction() |
static java.io.InputStream |
extractPartInputStream(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static java.lang.String |
getDecodedUri(javax.servlet.http.HttpServletRequest request) |
java.lang.String |
getIp() |
int |
getPort() |
java.lang.String |
getScheme() |
org.eclipse.jetty.server.Server |
getServer() |
protected static long |
getStartMillis() |
static java.lang.String |
getUserAgent() |
static void |
logRequest(java.lang.String method,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
registerHandlers(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper)
Hook up Jetty handlers.
|
static void |
sendErrorResponse(javax.servlet.http.HttpServletResponse response,
java.lang.Exception e,
java.lang.String uri) |
static void |
sendResponseError(javax.servlet.http.HttpServletResponse response,
int sc,
java.lang.String msg) |
static void |
setResponseStatus(javax.servlet.http.HttpServletResponse response,
int sc) |
void |
setServer(org.eclipse.jetty.server.Server value) |
void |
setup(java.lang.String ip,
int port) |
void |
start(java.lang.String ip,
int port)
Choose a Port and IP address and start the Jetty server.
|
protected void |
startHttp() |
static void |
startTransaction(java.lang.String userAgent) |
void |
stop()
Stop Jetty server after it has been started.
|
static boolean |
validKeyName(java.lang.String name) |
protected static long getStartMillis()
public static void startTransaction(java.lang.String userAgent)
public static void endTransaction()
public static java.lang.String getUserAgent()
public static void setResponseStatus(javax.servlet.http.HttpServletResponse response, int sc)
public static void sendResponseError(javax.servlet.http.HttpServletResponse response, int sc, java.lang.String msg) throws java.io.IOException
java.io.IOException
public java.lang.String getScheme()
public int getPort()
public java.lang.String getIp()
public org.eclipse.jetty.server.Server getServer()
public void setServer(org.eclipse.jetty.server.Server value)
public void setup(java.lang.String ip, int port)
public void start(java.lang.String ip, int port) throws java.lang.Exception
java.lang.Exception
public void acceptRequests()
protected void createServer(org.eclipse.jetty.server.Connector connector) throws java.lang.Exception
java.lang.Exception
protected void startHttp() throws java.lang.Exception
java.lang.Exception
public void stop() throws java.lang.Exception
java.lang.Exception
public void registerHandlers(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper)
public static java.io.InputStream extractPartInputStream(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOException
public static boolean validKeyName(java.lang.String name)
public static void sendErrorResponse(javax.servlet.http.HttpServletResponse response, java.lang.Exception e, java.lang.String uri)
public static java.lang.String getDecodedUri(javax.servlet.http.HttpServletRequest request)
public static void logRequest(java.lang.String method, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)