Class Index | File Index

Classes


Class R.resources.loaders.RemoteLoader


Extends R.resources.loaders.AbstractResourceLoader.
A base loader which implements the #exists method to synchronously check for the existence of a file.
Defined in: remoteloader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
Transmit status - Cached
 
Transmit status - Not found
 
Transmit status ok
 
Transmit status - Server error
Method Summary
Method Attributes Method Name and Description
 
exists(url)
Performs a synchronous check for a file on the server.
 
Get the class name of this object.
 
getPathUrl(name)
Get the URL where the resource is located.
 
The name of the resource this loader will get.
 
load(name, url, data, isReady)
Load an resource from a remote URL.
 
setPathUrl(name, url)
Set the path where a resource is located.
Methods borrowed from class R.resources.loaders.AbstractResourceLoader:
clear, destroy, exportAll, get, getCachedObjects, getResourceObject, getResources, isReady, release, set, setReady, unload
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent, update
Methods borrowed from class R.engine.PooledObject:
clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.resources.loaders.RemoteLoader(name)
Parameters:
name
{String=RemoteLoader} The name of the resource loader
Field Detail
STATUS_CACHED
Transmit status - Cached

STATUS_NOT_FOUND
Transmit status - Not found

STATUS_OK
Transmit status ok

STATUS_SERVER_ERROR
Transmit status - Server error
Method Detail
{Boolean} exists(url)
Performs a synchronous check for a file on the server. While this approach will work in most cases, there is the possibility that the server will become unavailable before the request is made. In this case, the application will hang until the request is satisfied (which may be never).
Parameters:
url
{String} The URL to check
Returns:
{Boolean} true if the file exists on the server or is in the cache.

{String} getClassName()
Get the class name of this object.
Returns:
{String} The string "R.resources.loaders.RemoteLoader"

{String} getPathUrl(name)
Get the URL where the resource is located.
Parameters:
name
{String} The name of the resource
Returns:
{String}

{String} getResourceType()
The name of the resource this loader will get.
Returns:
{String} The string "remote"

load(name, url, data, isReady)
Load an resource from a remote URL.
Parameters:
name
{String} The name of the resource
url
{String} The URL where the resource is located
data
{Object} The loaded data to cache
isReady

setPathUrl(name, url)
Set the path where a resource is located.
Parameters:
name
{String} the name of the resource
url
{String} The URL where the resource is located

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:20 GMT-0400 (EDT)