Package net.officefloor.web.state
Interface HttpApplicationState
- All Known Implementing Classes:
HttpApplicationStateManagedObjectSource
public interface HttpApplicationState
State for the web application instance.
- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionCreates the client path for this application.createApplicationClientUrl(boolean isSecure, String path, ServerHttpConnection connection) Creates the client URL for this application.extractApplicationPath(ServerHttpConnection connection) Extracts the application path from theHttpRequest.getAttribute(String name) Obtains theObjectthat is bound to the name.Obtains the context path for the application.voidremoveAttribute(String name) Removes the boundObjectby the name.voidsetAttribute(String name, Object object) Binds theObjectto the name.
-
Method Details
-
getContextPath
String getContextPath()Obtains the context path for the application.- Returns:
- Context path for the application.
-
createApplicationClientUrl
Creates the client URL for this application.
This includes
protocol,domainandport.- Parameters:
isSecure- Indicates if the URL is secure.path- Path including query string and fragment for the URL.connection-ServerHttpConnection.- Returns:
- Client URL for the application.
-
createApplicationClientPath
Creates the client path for this application.
This is the public path on the server, and does NOT
protocol,domainnorport.- Parameters:
path- Path including query string and fragment for the path.- Returns:
- Client path for the application.
-
extractApplicationPath
Extracts the application path from theHttpRequest.- Parameters:
connection-ServerHttpConnection.- Returns:
- Application path.
- Throws:
HttpException- If invalid path for this application.
-
getAttribute
Obtains theObjectthat is bound to the name. -
getAttributeNames
-
setAttribute
Binds theObjectto the name.- Parameters:
name- Name.object-Object.
-
removeAttribute
Removes the boundObjectby the name.- Parameters:
name- Name of boundObjectto remove.
-