Class 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 by JsHelper.
    This object is used to get a proxy instance which is able to call a java script function passing also this java script value, to maintain the environment when required.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • CallbackProxy

        public CallbackProxy()
    • Method Detail

      • getProxy

        @JsProperty
        public CallbackProxy.Proxy getProxy()
        Returns the function proxy implemented in the additional java script source.
        Returns:
        the proxy function proxy implemented in the additional java script source
      • getCallback

        @JsProperty
        public T getCallback()
        Returns the function callback implemented in the additional java script source.
        Returns:
        the function callback implemented in the additional java script source
      • setIgnoreFunctionContext

        @JsProperty
        public void setIgnoreFunctionContext​(boolean ignore)
        Sets true if the functional context must be ignored as argument to pass to callback.
        Parameters:
        ignore - true if the functional context must be ignored as argument to pass to callback
      • isIgnoreFunctionContext

        @JsProperty
        public boolean isIgnoreFunctionContext()
        Returns true if the functional context must be ignored as argument to pass to callback.
        Returns:
        true if the functional context must be ignored as argument to pass to callback
      • setCallback

        @JsProperty
        public void setCallback​(T callback)
        Sets the function callback implemented in the additional java script source.
        Parameters:
        callback - the function callback implemented in the additional java script source