public abstract class RequestAdapter extends Object
IPageManager
.Constructor and Description |
---|
RequestAdapter(IPageManagerContext context)
Construct.
|
Modifier and Type | Method and Description |
---|---|
protected void |
bind()
Bind the session
|
void |
clear() |
protected void |
commitRequest() |
protected void |
endRequest() |
protected IManageablePage |
findPage(int id) |
protected abstract IManageablePage |
getPage(int id)
Returns the page with specified id.
|
Serializable |
getSessionAttribute(String key) |
String |
getSessionId() |
protected abstract void |
newSessionCreated()
Notification on new session being created.
|
protected abstract void |
removePage(IManageablePage page)
Removes a page from the cache and the stores (
IPageStore and
IDataStore ). |
void |
setSessionAttribute(String key,
Serializable value) |
protected abstract void |
storeTouchedPages(List<IManageablePage> touchedPages)
Store the list of stateful pages.
|
protected void |
touch(IManageablePage page)
Touches a page, so it will be stored in the page stores
at the end of the request cycle
|
protected void |
untouch(IManageablePage page) |
public RequestAdapter(IPageManagerContext context)
context
- The page manager contextprotected abstract IManageablePage getPage(int id)
RequestAdapter
during
the rest of request processing.id
- null
if the page does not exist.protected abstract void removePage(IManageablePage page)
IPageStore
and
IDataStore
). Any attempt to access it later
will lead to PageExpiredException
page
- The page instance to removeprotected abstract void storeTouchedPages(List<IManageablePage> touchedPages)
touchedPages
- protected abstract void newSessionCreated()
protected void bind()
IPageManagerContext.bind()
public void setSessionAttribute(String key, Serializable value)
key
- value
- IPageManagerContext.setSessionAttribute(String, Serializable)
public Serializable getSessionAttribute(String key)
key
- IPageManagerContext.getSessionAttribute(String)
public String getSessionId()
IPageManagerContext.getSessionId()
protected IManageablePage findPage(int id)
id
- protected void touch(IManageablePage page)
page
- The page to mark as dirtyprotected void untouch(IManageablePage page)
page
- The page to unmark as dirty, so it won't be stored
at the end of the request cycleprotected void endRequest()
protected void commitRequest()
public void clear()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.