Interface Emulator
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
JettyEmulator
The application server emulator interface.
- Author:
- Hawk
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()get the URL address.get the context path of the applicationgetHost()get the host address the emulator bound.intgetPort()get the port number the emulator bound.get the attributes of last request.get the parameters of last request.javax.servlet.ServletContextget the reference of servlet context in the emulator.get the session's attributes of last request.get the session ID of last request.
-
Method Details
-
getHost
String getHost()get the host address the emulator bound. normally, it should be "127.0.0.1".- Returns:
- host address
-
getPort
int getPort()get the port number the emulator bound.- Returns:
- port number
-
getAddress
String getAddress()get the URL address.- Returns:
- URL.
-
getContextPath
String getContextPath()get the context path of the application- Returns:
- the context path
-
getServletContext
javax.servlet.ServletContext getServletContext()get the reference of servlet context in the emulator.- Returns:
- servlet context
-
getRequestAttributes
get the attributes of last request.- Returns:
- attributes.
-
getRequestParameters
get the parameters of last request.- Returns:
- parameters.
-
getSessionAttributes
get the session's attributes of last request.- Returns:
- attributes.
-
getSessionId
String getSessionId()get the session ID of last request.- Returns:
- ID or null if no session created.
-
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-