|
||||||||||
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)
Deprecated. It is suggested to use Execution.getNativeResponse()
instead |
void |
addHeader(java.lang.String name,
java.lang.String value)
Deprecated. As of release 3.6.3, replaced with Execution.addResponseHeader(java.lang.String, java.lang.String) . |
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.String |
getRequestId()
Returns the sequence ID of the current request, or null if not available. |
java.util.Collection |
getResponses()
Returns the collection of the AU responses ( AuResponse )
that shall be generated to the output, or null if not available. |
Visualizer |
getVisualizer()
Returns the Visualizer for this execution. |
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 |
setContentType(java.lang.String contentType)
Sets the content type. |
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)
Deprecated. It is suggested to use Execution.getNativeResponse()
instead. |
void |
setDesktop(Desktop desktop)
Sets the desktop associated with this execution. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Deprecated. As of release 3.6.3, replaced with Execution.setResponseHeader(java.lang.String, java.lang.String) . |
void |
setRequestId(java.lang.String reqId)
Sets the sequence ID of the current request. |
void |
setResponses(java.util.Collection responses)
Sets the collection of the AU responses ( AuResponse )
that shall be generated to the output. |
Method Detail |
---|
Page getCurrentPage()
Design decision: we put it here because user need not to know about the conccept of the current page.
Since 3.6.0, this method returns the first page if
setCurrentPage(org.zkoss.zk.ui.Page)
was not called (such as Server Push).
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.
Visualizer getVisualizer()
Visualizer
for this execution.
It is the same as DesktopCtrl.getVisualizer()
.
void setHeader(java.lang.String name, java.lang.String value)
Execution.setResponseHeader(java.lang.String, java.lang.String)
.
void setDateHeader(java.lang.String name, long value)
Execution.getNativeResponse()
instead.
void addHeader(java.lang.String name, java.lang.String value)
Execution.addResponseHeader(java.lang.String, java.lang.String)
.
void addDateHeader(java.lang.String name, long value)
Execution.getNativeResponse()
instead
void setContentType(java.lang.String contentType)
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.void setRequestId(java.lang.String reqId)
java.lang.String getRequestId()
java.util.Collection getResponses()
AuResponse
)
that shall be generated to the output, or null if not available.
void setResponses(java.util.Collection responses)
AuResponse
)
that shall be generated to the output.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |