|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceHandler
Represents a single resource that a component in a page needs a browser to fetch. This class helps generate the URI that is emitted into the page, and specifies the class that should be invoked to handle the request for that URI when the browser makes it.
Method Summary | |
---|---|
boolean |
equals(Object obj)
Must be implemented to avoid loading the same resource multiple times. |
Class |
getResourceLoaderClass()
Return a Class object whose instance can decode the url generated by this class in the getResourceUri method and use that info to locate the resource data represented by this object. |
String |
getResourceUri(javax.faces.context.FacesContext context)
Returns the uri part which is used by the resourceloader to identify the resource to load. |
int |
hashCode()
Must always be implemented when equals is overridden. |
Method Detail |
---|
Class getResourceLoaderClass()
ResourceLoader
String getResourceUri(javax.faces.context.FacesContext context)
ResourceLoader.serveResource(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String)
int hashCode()
hashCode
in class Object
Object.hashCode()
boolean equals(Object obj)
When the same component is used multiple times in a page and that component needs an external resource such as a script, multiple calls will be made to the AddResource methods for the same resource. The AddResource class will create an instance of this class for each such call. However if there is already a ResourceHandler instance existing which is "equal" to the newly created one then a duplicate will not be queued for output.
equals
in class Object
Object.equals(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |