goog.net.XhrManager.Request
Classgoog.net.XhrManager.Request
> goog.Disposable
goog.net.XhrManager.Request(url, xhrEventCallback, opt_method, opt_content, opt_headers,
opt_callback, opt_maxRetries)
An encapsulation of everything needed to make a Xhr request. NOTE: This is used internal to the XhrManager.
url
{string
}
xhrEventCallback
{Function
}
opt_method
{string
=}
opt_content
{string
=}
opt_headers
{Object
|goog.structs.Map
=}
opt_callback
{Function
=}
opt_maxRetries
{number
=}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
[protected]Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example:
mypackage.MyClass = function() { goog.base(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { goog.base(this, 'disposeInternal'); // Dispose logic specific to MyClass. ... };
.getAborted()
Gets the aborted status.
boolean
}
.getAttemptCount()
Gets the number of attempts so far.
number
}
.getCompleteCallback()
Gets the callback for when the request is complete.
Function
|undefined
}
.getCompleted()
Gets the completed status.
boolean
}
.getContent()
Gets the post data.
string
|undefined
}
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getHeaders()
Gets the map of headers.
Object
|goog.structs.Map
}
.getMaxRetries()
Gets the maximum number of times the request should be retried.
number
}
.getMethod()
Gets the send method.
string
}
.getUrl()
Gets the uri.
string
}
.getXhrEventCallback()
Gets the callback attached to the events of the XhrIo object.
Function
|undefined
}
.hasReachedMaxRetries()
Returns whether the request has reached the maximum number of retries.
boolean
}
.increaseAttemptCount()
Increases the number of attempts so far.
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.setAborted(aborted)
Sets the aborted status.
aborted
{boolean
}
.setCompleted(complete)
Sets the completed status.
complete
{boolean
}
.xhrIo
{goog.net.XhrIo
}The XhrIo instance handling this request. Set in handleAvailableXhr.