public interface HttpRequestState
State for the HttpRequest
.
A ClassManagedObjectSource
provides similar functionality for each
bound object, however only objects registered with this
HttpRequestState
will be available across redirects.
Also this interface is used within the WebAutoWireApplication
to
allow integration with a JEE Servlet container.
Modifier and Type | Method and Description |
---|---|
Serializable |
exportState()
Exports a momento for the current state of this
HttpRequestState . |
Serializable |
getAttribute(String name)
Obtains the
Object that is bound to the name. |
Iterator<String> |
getAttributeNames()
|
void |
importState(Serializable momento)
Imports the state from the momento.
|
void |
removeAttribute(String name)
Removes the bound
Object by the name. |
void |
setAttribute(String name,
Serializable object)
Binds the
Object to the name. |
Serializable getAttribute(String name)
Object
that is bound to the name.void setAttribute(String name, Serializable object)
Object
to the name.name
- Name.object
- Object
. Must be Serializable
as this
HttpRequestState
may be stored in the
HttpSession
to maintain its state across a redirect.void removeAttribute(String name)
Object
by the name.name
- Name of bound Object
to remove.Serializable exportState() throws IOException
HttpRequestState
.HttpRequestState
.IOException
- If fails to export state.void importState(Serializable momento) throws IOException, IllegalArgumentException
momento
- Momento containing the state for the HttpRequestState
.IOException
- If fails to import state.IllegalArgumentException
- If invalid momento.Copyright © 2005–2016. All rights reserved.