/** * Create a new JSONP request. * * @param callback The callback instance to notify when the response comes * back * @param timeout Time in ms after which a {@link TimeoutException} will be * thrown * @param expectInteger Should be true if T is {@link Integer}, false * otherwise * @param callbackParam Name of the url param of the callback function name * @param failureCallbackParam Name of the url param containing the * failure callback function name, or null for no failure callback */ JsonpRequest(AsyncCallback<T> callback, int timeout, boolean expectInteger, String callbackParam, String failureCallbackParam) { callbackId = nextCallbackId(); this.callback = callback; this.timeout = timeout; this.expectInteger = expectInteger; this.callbackParam = callbackParam; this.failureCallbackParam = failureCallbackParam; this.canHaveMultipleRequestsForSameId = false; }
/** * Create a new JSONP request. * * @param callback The callback instance to notify when the response comes * back * @param timeout Time in ms after which a {@link TimeoutException} will be * thrown * @param expectInteger Should be true if T is {@link Integer}, false * otherwise * @param callbackParam Name of the url param of the callback function name * @param failureCallbackParam Name of the url param containing the * failure callback function name, or null for no failure callback */ JsonpRequest(AsyncCallback<T> callback, int timeout, boolean expectInteger, String callbackParam, String failureCallbackParam) { callbackId = nextCallbackId(); this.callback = callback; this.timeout = timeout; this.expectInteger = expectInteger; this.callbackParam = callbackParam; this.failureCallbackParam = failureCallbackParam; this.canHaveMultipleRequestsForSameId = false; }
/** * Create a new JSONP request. * * @param callback The callback instance to notify when the response comes * back * @param timeout Time in ms after which a {@link TimeoutException} will be * thrown * @param expectInteger Should be true if T is {@link Integer}, false * otherwise * @param callbackParam Name of the url param of the callback function name * @param failureCallbackParam Name of the url param containing the * failure callback function name, or null for no failure callback */ JsonpRequest(AsyncCallback<T> callback, int timeout, boolean expectInteger, String callbackParam, String failureCallbackParam) { callbackId = nextCallbackId(); this.callback = callback; this.timeout = timeout; this.expectInteger = expectInteger; this.callbackParam = callbackParam; this.failureCallbackParam = failureCallbackParam; this.canHaveMultipleRequestsForSameId = false; }