/** * Create a new JSONP request with a hardcoded id. This could be used to * manually control which resources are considered duplicates (by giving them * identical ids). Could also be used if the callback name needs to be * completely user controlled (since the id is part of the callback name). * * @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 * @param id unique id for the resource that is being fetched */ JsonpRequest(AsyncCallback<T> callback, int timeout, boolean expectInteger, String callbackParam, String failureCallbackParam, String id) { callbackId = getPredeterminedId(id); this.callback = callback; this.timeout = timeout; this.expectInteger = expectInteger; this.callbackParam = callbackParam; this.failureCallbackParam = failureCallbackParam; this.canHaveMultipleRequestsForSameId = true; }
/** * Create a new JSONP request with a hardcoded id. This could be used to * manually control which resources are considered duplicates (by giving them * identical ids). Could also be used if the callback name needs to be * completely user controlled (since the id is part of the callback name). * * @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 * @param id unique id for the resource that is being fetched */ JsonpRequest(AsyncCallback<T> callback, int timeout, boolean expectInteger, String callbackParam, String failureCallbackParam, String id) { callbackId = getPredeterminedId(id); this.callback = callback; this.timeout = timeout; this.expectInteger = expectInteger; this.callbackParam = callbackParam; this.failureCallbackParam = failureCallbackParam; this.canHaveMultipleRequestsForSameId = true; }
/** * Create a new JSONP request with a hardcoded id. This could be used to * manually control which resources are considered duplicates (by giving them * identical ids). Could also be used if the callback name needs to be * completely user controlled (since the id is part of the callback name). * * @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 * @param id unique id for the resource that is being fetched */ JsonpRequest(AsyncCallback<T> callback, int timeout, boolean expectInteger, String callbackParam, String failureCallbackParam, String id) { callbackId = getPredeterminedId(id); this.callback = callback; this.timeout = timeout; this.expectInteger = expectInteger; this.callbackParam = callbackParam; this.failureCallbackParam = failureCallbackParam; this.canHaveMultipleRequestsForSameId = true; }