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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
createApplicationClientPath(java.lang.String path)
Creates the client path for this application.java.lang.String
createApplicationClientUrl(boolean isSecure, java.lang.String path, ServerHttpConnection connection)
Creates the client URL for this application.java.lang.String
extractApplicationPath(ServerHttpConnection connection)
Extracts the application path from theHttpRequest
.java.lang.Object
getAttribute(java.lang.String name)
Obtains theObject
that is bound to the name.java.util.Iterator<java.lang.String>
getAttributeNames()
Obtains anIterator
to the names of the boundObject
instances.java.lang.String
getContextPath()
Obtains the context path for the application.void
removeAttribute(java.lang.String name)
Removes the boundObject
by the name.void
setAttribute(java.lang.String name, java.lang.Object object)
Binds theObject
to 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
,domain
andport
.- 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
,domain
norport
.- 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 theObject
that is bound to the name.- Parameters:
name
- Name.- Returns:
Object
bound to the name ornull
if noObject
bound by the name.
-
getAttributeNames
java.util.Iterator<java.lang.String> getAttributeNames()
Obtains anIterator
to the names of the boundObject
instances.- Returns:
Iterator
to the names of the boundObject
instances.
-
setAttribute
void setAttribute(java.lang.String name, java.lang.Object object)
Binds theObject
to the name.- Parameters:
name
- Name.object
-Object
.
-
removeAttribute
void removeAttribute(java.lang.String name)
Removes the boundObject
by the name.- Parameters:
name
- Name of boundObject
to remove.
-
-