Package net.officefloor.web.state
Interface HttpApplicationState
-
- All Known Implementing Classes:
HttpApplicationStateManagedObjectSource
public interface HttpApplicationStateState for the web application instance.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringcreateApplicationClientPath(java.lang.String path)Creates the client path for this application.java.lang.StringcreateApplicationClientUrl(boolean isSecure, java.lang.String path, ServerHttpConnection connection)Creates the client URL for this application.java.lang.StringextractApplicationPath(ServerHttpConnection connection)Extracts the application path from theHttpRequest.java.lang.ObjectgetAttribute(java.lang.String name)Obtains theObjectthat is bound to the name.java.util.Iterator<java.lang.String>getAttributeNames()Obtains anIteratorto the names of the boundObjectinstances.java.lang.StringgetContextPath()Obtains the context path for the application.voidremoveAttribute(java.lang.String name)Removes the boundObjectby the name.voidsetAttribute(java.lang.String name, java.lang.Object object)Binds theObjectto the name.
-
-
-
Method Detail
-
getContextPath
java.lang.String getContextPath()
Obtains the context path for the application.- Returns:
- Context path for the application.
-
createApplicationClientUrl
java.lang.String createApplicationClientUrl(boolean isSecure, java.lang.String path, ServerHttpConnection connection)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
java.lang.String createApplicationClientPath(java.lang.String path)
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
java.lang.String extractApplicationPath(ServerHttpConnection connection) throws HttpException
Extracts the application path from theHttpRequest.- Parameters:
connection-ServerHttpConnection.- Returns:
- Application path.
- Throws:
HttpException- If invalid path for this application.
-
getAttribute
java.lang.Object getAttribute(java.lang.String name)
Obtains theObjectthat is bound to the name.- Parameters:
name- Name.- Returns:
Objectbound to the name ornullif noObjectbound by the name.
-
getAttributeNames
java.util.Iterator<java.lang.String> getAttributeNames()
Obtains anIteratorto the names of the boundObjectinstances.- Returns:
Iteratorto the names of the boundObjectinstances.
-
setAttribute
void setAttribute(java.lang.String name, java.lang.Object object)Binds theObjectto the name.- Parameters:
name- Name.object-Object.
-
removeAttribute
void removeAttribute(java.lang.String name)
Removes the boundObjectby the name.- Parameters:
name- Name of boundObjectto remove.
-
-