java.lang.Object | |
↳ | com.google.gwt.core.client.impl.AsyncFragmentLoader |
Low-level support to download an extra fragment of code. This should not be invoked directly by user code.
The fragments are numbered as follows, assuming there are m split points:
Since the precise way to load code depends on the linker, linkers should
specify a rebind of AsyncFragmentLoader.LoadingStrategy
. The default rebind is
XhrLoadingStrategy
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AsyncFragmentLoader.LoadTerminatedHandler | An interface for handlers of load completion. | ||||||||||
AsyncFragmentLoader.LoadingStrategy | A strategy for loading code fragments. | ||||||||||
AsyncFragmentLoader.Logger | A strategy for logging progress. | ||||||||||
AsyncFragmentLoader.LwmLabels | Labels used for runAsync lightweight metrics. | ||||||||||
AsyncFragmentLoader.StandardLogger | The standard logger used in a web browser. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BROWSER_LOADER | The standard instance of AsyncFragmentLoader used in a web browser. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A helper static method that invokes
BROWSER_LOADER.leftoversFragmentHasLoaded().
| |||||||||||
Inform the loader that a fragment has now finished loading.
| |||||||||||
Requests a load of the code for the specified split point.
| |||||||||||
Log an event with the {@Logger } this instance was provided.
| |||||||||||
Request that a sequence of split points be prefetched.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The standard instance of AsyncFragmentLoader used in a web browser. If
not in GWT (i.e our vanilla JUnit tests, or if referenced in a server
context), this filed is null
. In GWT, the parameters to this call
are rewritten by com.google.gwt.dev.jjs.impl.ReplaceRunAsyncs. So
this must be a method call of exactly two arguments, or that magic fails.
A helper static method that invokes BROWSER_LOADER.leftoversFragmentHasLoaded(). Such a call is generated by the compiler, as it is much simpler if there is a static method to wrap up the call.
Inform the loader that a fragment has now finished loading.
Requests a load of the code for the specified split point. If the load
fails, loadErrorHandler
will be invoked. If it succeeds, then
the code will be installed, and the code is expected to invoke its own
on-success hooks, including a call to either
leftoversFragmentHasLoaded()
or fragmentHasLoaded(int)
.
splitPoint | the split point whose code needs to be loaded |
---|
Log an event with the {@Logger } this instance was provided.
Request that a sequence of split points be prefetched. Code for the split
points in splitPoints
will be downloaded and installed
whenever there is nothing else to download. Each call to this method
overwrites the entire prefetch queue with the newly specified one.