|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExecutionCtrl
Additional interface to Execution
for implementation.
Application developers shall never access any of this methods.
| Method Summary | |
|---|---|
void |
addDateHeader(java.lang.String name,
long value)
Adds a response header with the given name and date-value. |
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds a responseheader with the given name and value. |
Page |
getCurrentPage()
Returns the current page. |
PageDefinition |
getCurrentPageDefinition()
Returns the current page definition, which is pushed when evaluating a page (from a page definition). |
Event |
getNextEvent()
Returns the next event queued by Execution.postEvent(org.zkoss.zk.ui.event.Event), or null if no event queued. |
java.lang.Object |
getRequestAttribute(java.lang.String name)
Returns the value of an attribute in the client request (e.g., HTTP request) that creates this execution. |
Visualizer |
getVisualizer()
Returns the Visualizer for this execution
(set by setVisualizer(org.zkoss.zk.ui.sys.Visualizer). |
boolean |
isActivated()
Returns whether this execution is activated. |
boolean |
isRecovering()
Returns whether this execution is in recovering. |
void |
onActivate()
Called when this execution is about to become the current execution Executions.getCurrent(). |
void |
onDeactivate()
Called when this execution is about to become a non-current execution. |
void |
setCurrentPage(Page page)
Sets the current page. |
void |
setCurrentPageDefinition(PageDefinition pgdef)
Sets the current page definition. |
void |
setDateHeader(java.lang.String name,
long value)
Sets a response header with the given name and date-value. |
void |
setDesktop(Desktop desktop)
Sets the desktop associated with this execution. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets a responseheader with the given name and value. |
void |
setRequestAttribute(java.lang.String name,
java.lang.Object value)
Sets the value of an attribute to the client request (e.g., HTTP request) that creates this execution. |
void |
setVisualizer(Visualizer ei)
Sets the Visualizer for this execution. |
| Method Detail |
|---|
Page getCurrentPage()
Design decision: we put it here because user need not to know about the conccept of the current page.
Desktop.getPage(java.lang.String)void setCurrentPage(Page page)
PageDefinition getCurrentPageDefinition()
void setCurrentPageDefinition(PageDefinition pgdef)
pgdef - the page definition. If null, it means it is the same
as getCurrentPage().getPageDefinition().Event getNextEvent()
Execution.postEvent(org.zkoss.zk.ui.event.Event), or null if no event queued.
boolean isActivated()
void onActivate()
Executions.getCurrent().
Note: an execution might spread over several threads, so this method might be called several times to activate the states in each thread. Also, an execution might be activated before another is deactivate. For example, when a component includes another page, the second exec is activated to render the included page.
It is used as callback notification.
Note: don't throw any exception in this method.
void onDeactivate()
It is used as callback notification.
Note: don't throw any exception in this method.
onActivate()boolean isRecovering()
FailoverManager.recover(org.zkoss.zk.ui.Session, org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Desktop).
If in recovering, no response is sent to the client.
It assumes the server is recovering the desktop and all it contains
to match the client's status.
void setVisualizer(Visualizer ei)
Visualizer for this execution.
It could be anything that UiEngine requires.
Visualizer getVisualizer()
Visualizer for this execution
(set by setVisualizer(org.zkoss.zk.ui.sys.Visualizer).
void setHeader(java.lang.String name,
java.lang.String value)
value - the additional header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt).
void setDateHeader(java.lang.String name,
long value)
void addHeader(java.lang.String name,
java.lang.String value)
value - the additional header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt).
void addDateHeader(java.lang.String name,
long value)
java.lang.Object getRequestAttribute(java.lang.String name)
Notice that a servlet might include serveral ZK pages, while an independent execution is created for adding a new page. It means, each client request might create several executions. Thus, the attribute set by this method might last for several executions (until the request ends).
void setRequestAttribute(java.lang.String name,
java.lang.Object value)
void setDesktop(Desktop desktop)
Currently, it is used to communicate between WebManager.newDesktop and DesktopImpl's constructor.
java.lang.IllegalArgumentException - if desktop is null
java.lang.IllegalStateException - if there is already a desktop
is associated with it.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||