Constructor and Description |
---|
JettyEmulator(org.eclipse.jetty.util.resource.Resource[] contentRoots,
java.lang.String descriptor,
java.lang.String contextPath)
new a jetty emulator
|
JettyEmulator(org.eclipse.jetty.util.resource.Resource contentRoot,
java.lang.String descriptor,
java.lang.String contextPath) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.String |
getAddress()
get the URL address.
|
java.lang.String |
getContextPath()
get the context path of the application
|
java.lang.String |
getHost()
get the host address the emulator bound.
|
int |
getPort()
get the port number the emulator bound.
|
java.util.Map<java.lang.String,java.lang.Object> |
getRequestAttributes()
get the attributes of last request.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getRequestParameters()
get the parameters of last request.
|
javax.servlet.ServletContext |
getServletContext()
get the reference of servlet context in the emulator.
|
java.util.Map<java.lang.String,java.lang.Object> |
getSessionAttributes()
get the session's attributes of last request.
|
java.lang.String |
getSessionId()
get the session ID of last request.
|
public JettyEmulator(org.eclipse.jetty.util.resource.Resource contentRoot, java.lang.String descriptor, java.lang.String contextPath)
public JettyEmulator(org.eclipse.jetty.util.resource.Resource[] contentRoots, java.lang.String descriptor, java.lang.String contextPath)
contentRoots
- the content roots.descriptor
- specify the web.xml, if null then use /WEB-INF/web.xml that in contentRootscontextPath
- specify the context, if null then use "/"public void close()
public java.lang.String getHost()
Emulator
public int getPort()
Emulator
public java.lang.String getContextPath()
Emulator
getContextPath
in interface Emulator
public java.lang.String getAddress()
Emulator
getAddress
in interface Emulator
public javax.servlet.ServletContext getServletContext()
Emulator
getServletContext
in interface Emulator
public java.util.Map<java.lang.String,java.lang.Object> getRequestAttributes()
Emulator
getRequestAttributes
in interface Emulator
public java.util.Map<java.lang.String,java.lang.String[]> getRequestParameters()
Emulator
getRequestParameters
in interface Emulator
public java.util.Map<java.lang.String,java.lang.Object> getSessionAttributes()
Emulator
getSessionAttributes
in interface Emulator
public java.lang.String getSessionId()
Emulator
getSessionId
in interface Emulator
Copyright © 2019 Potix Corporation. All rights reserved.