Class CancellationController
- All Implemented Interfaces:
HasHandlers
-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancel()Requests cancellation of all asynchronous operations that are pollingcanceledor observing this method.Requests cancellation of all asynchronous operations that are pollingcanceledor observing this method.create()Creates a newCancellationControllerwhich is canceled whenever thisCancellationControlleris canceled.Whethercancel()has been called.The reason, if any, passed to the first call tocancel().getJsObj()static CancellationControllergetOrCreateRef(JavaScriptObject jsObj) booleanvoidMethods inherited from class com.smartgwt.client.core.BaseClass
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
-
Constructor Details
-
CancellationController
public CancellationController() -
CancellationController
-
-
Method Details
-
getOrCreateRef
-
setJavaScriptObject
- Overrides:
setJavaScriptObjectin classBaseClass
-
create
-
isCreated
public boolean isCreated() -
getJsObj
-
getOrCreateJsObj
- Overrides:
getOrCreateJsObjin classBaseClass
-
getCanceled
Whethercancel()has been called.Note : This method should be called only after the underlying component has been created.
- Returns:
- Current canceled value. Default value is false
- Throws:
IllegalStateException- if the underlying component has not yet been created.
-
getCancellationReason
The reason, if any, passed to the first call tocancel().Note : This method should be called only after the underlying component has been created.
- Returns:
- Current cancellationReason value. Default value is null
- Throws:
IllegalStateException- if the underlying component has not yet been created.- See Also:
-
cancel
Requests cancellation of all asynchronous operations that are pollingcanceledor observing this method. Also cancels anysub-s of thisCancellationControllerCancellationControllerthat are not already canceled.this.cancellationReasonis set to the providedreasononly on the first call to cancel().For observers of this method, the recommended practice is to capture the
returnValand only perform the cancellation steps if thereturnValwastrue. This is because it could happen that cancel() is called a second time before the observers finish.- Returns:
trueif this was the first call to cancel();falseotherwise.
-
cancel
Requests cancellation of all asynchronous operations that are pollingcanceledor observing this method. Also cancels anysub-s of thisCancellationControllerCancellationControllerthat are not already canceled.this.cancellationReasonis set to the providedreasononly on the first call to cancel().For observers of this method, the recommended practice is to capture the
returnValand only perform the cancellation steps if thereturnValwastrue. This is because it could happen that cancel() is called a second time before the observers finish.- Parameters:
reason- A reason for cancellation. SeeHTMLString- Returns:
trueif this was the first call to cancel();falseotherwise.
-
createSubController
Creates a newCancellationControllerwhich is canceled whenever thisCancellationControlleris canceled.Note that the sub-
CancellationControllermay be independently canceled before this parentCancellationControlleris canceled.- Returns:
- a new
CancellationControllerthat is canceled whenever thisCancellationControlleris canceled.
-