Package com.iizix.prop
Class PreloadClientCacheResource
java.lang.Object
com.iizix.prop.PreloadClientCacheResource
- Direct Known Subclasses:
- CSSResourceFilePreload,- FontFilePreloadClientCacheResource
Class holding information for a single resource that should be preloaded to the client cache when the application starts.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final PreloadClientCacheResource[]An empty array of resources.
- Constructor SummaryConstructorsConstructorDescription- PreloadClientCacheResource- (PropCnr owner, String path) Constructs the resource.
- Method SummaryModifier and TypeMethodDescription- abstract longReturns the modification time of the resource.- getOwner()Gets the owner property.- getPath()Gets the path to the resource used for the client side.- abstract long- getSize()Returns the size of the resource in bytes.- boolean- isRelevant- (IClientSessionGyro clientGyro) Verifies if this resource is of relevant use for the client.
- Field Details- EMPTYAn empty array of resources.
 
- Constructor Details- PreloadClientCacheResourceConstructs the resource.- Parameters:
- owner- The owner property.
- path- The resource path for the client as "module$/path/filename.ext".
 
 
- Method Details- getOwnerGets the owner property.- Returns:
- The property containing the asset reference.
 
- getPathGets the path to the resource used for the client side.- Returns:
- The relative path of the resource in the form of "module$/path/filename.ext".
 
- isRelevantVerifies if this resource is of relevant use for the client. This call makes it possible to verify the client browser or alike to check if a resource is needed (e.g. a font icon resource of WOFF2 may only be required in particular cases, whereas the WOFF type may be required for the other clients).- Parameters:
- clientGyro- The client gyro instance, initialized with client side information.
- Returns:
- true If the resource is relevant, false otherwise. The default is to return true.
 
- getSizepublic abstract long getSize()Returns the size of the resource in bytes.- Returns:
- The size, or -1 if resource is not found.
 
- getModificationTimepublic abstract long getModificationTime()Returns the modification time of the resource.- Returns:
- The modification time, or zero if resource is not found.