Class CallbackProxy<T>
- java.lang.Object
-
- org.pepstock.charba.client.commons.CallbackProxy<T>
-
@JsType(isNative=true, namespace="<global>", name="CharbaCallbackProxy") public final class CallbackProxy<T> extends Object
This is a native object which wraps a java script object created byJsHelper.
This object is used to get a proxy instance which is able to call a java script function passing alsothisjava script value, to maintain the environment when required.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCallbackProxy.ProxyIt's a java script function which maps the functionproxyimplemented in the additional java script source.
-
Constructor Summary
Constructors Constructor Description CallbackProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetCallback()Returns the functioncallbackimplemented in the additional java script source.CallbackProxy.ProxygetProxy()Returns the functionproxyimplemented in the additional java script source.booleanisIgnoreFunctionContext()Returnstrueif the functional context must be ignored as argument to pass to callback.voidsetCallback(T callback)Sets the functioncallbackimplemented in the additional java script source.voidsetIgnoreFunctionContext(boolean ignore)Setstrueif the functional context must be ignored as argument to pass to callback.
-
-
-
Method Detail
-
getProxy
@JsProperty public CallbackProxy.Proxy getProxy()
Returns the functionproxyimplemented in the additional java script source.- Returns:
- the proxy function
proxyimplemented in the additional java script source
-
getCallback
@JsProperty public T getCallback()
Returns the functioncallbackimplemented in the additional java script source.- Returns:
- the function
callbackimplemented in the additional java script source
-
setIgnoreFunctionContext
@JsProperty public void setIgnoreFunctionContext(boolean ignore)
Setstrueif the functional context must be ignored as argument to pass to callback.- Parameters:
ignore-trueif the functional context must be ignored as argument to pass to callback
-
isIgnoreFunctionContext
@JsProperty public boolean isIgnoreFunctionContext()
Returnstrueif the functional context must be ignored as argument to pass to callback.- Returns:
trueif the functional context must be ignored as argument to pass to callback
-
setCallback
@JsProperty public void setCallback(T callback)
Sets the functioncallbackimplemented in the additional java script source.- Parameters:
callback- the functioncallbackimplemented in the additional java script source
-
-