jakarta.faces.application.Resource . The ResourceImpl instance itself has the same
lifespan as the request, however, the ResourceInfo instances that back this object are cached by the ResourceManager
to reduce the time spent scanning for resources.
| Modifier and Type | Field and Description |
|---|---|
| private static final TimeZone | |
| private static final String | |
| private long | initialTime
Time when this application was started. |
| private static final Logger | |
| private long | maxAge
Lifespan of this resource for caching purposes. |
| private URL | resolvedUrl
The URL of this |
| private transient ResourceInfo | |
| private transient Map | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ResourceImpl(ResourceInfo
the resource info resourceInfo, String the resource content type contentType, long the resource initial time initialTime, long the resource max age maxAge)Creates a new instance of ResourceBase |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| private long | |
| public InputStream | getInputStream()
Implements abstract jakarta.
If the current request is a resource request, (that is,
|
| public String | getRequestPath()
Implements abstract jakarta. Return a path to this resource such that, when the browser resolves it against the base URI for the view that includes the resource, and issues a GET request to the resultant fully qualified URL, the bytes of the resource are returned in response. |
| public Map | getResponseHeaders()
Implements abstract jakarta. Implementation Note Any values added to getResponseHeaders() will only be visible across multiple calls to this
method when servicing a resource request (i.e.
|
| public URL | getURL()
Implements abstract jakarta.
Return an actual |
| public int | |
| private void | |
| private boolean | |
| public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public boolean | userAgentNeedsUpdate(FacesContext
the Faces context. context)Implements abstract jakarta.
Return |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| GMT | back to summary |
|---|---|
| private static final TimeZone GMT | |
| IF_MODIFIED_SINCE | back to summary |
|---|---|
| private static final String IF_MODIFIED_SINCE | |
| initialTime | back to summary |
|---|---|
| private long initialTime Time when this application was started. This is used to generate expiration headers. | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| maxAge | back to summary |
|---|---|
| private long maxAge Lifespan of this resource for caching purposes. | |
| resolvedUrl | back to summary |
|---|---|
| private URL resolvedUrl The URL of this | |
| resourceInfo | back to summary |
|---|---|
| private transient ResourceInfo resourceInfo | |
| responseHeaders | back to summary |
|---|---|
| private transient Map<String, String> responseHeaders | |
| RFC1123_DATE_PATTERN | back to summary |
|---|---|
| private static final String RFC1123_DATE_PATTERN | |
| ResourceImpl | back to summary |
|---|---|
| public ResourceImpl() Necessary for serialization.
| |
| ResourceImpl | back to summary |
|---|---|
| public ResourceImpl(ResourceInfo resourceInfo, String contentType, long initialTime, long maxAge) Creates a new instance of ResourceBase
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getIfModifiedHeader | back to summary |
|---|---|
| private long getIfModifiedHeader(ExternalContext extcontext) | |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Implements abstract jakarta. Doc from jakarta.
If the current request is a resource request, (that is,
| |
| getRequestPath | back to summary |
|---|---|
| public String getRequestPath() Implements abstract jakarta. Doc from jakarta. Return a path to this resource such that, when the browser resolves it against the base URI for the view that includes the resource, and issues a GET request to the resultant fully qualified URL, the bytes of the resource are returned in response. The default implementation must implement the following algorithm. For discussion, the return result from this method will be called result.
| |
| getResponseHeaders | back to summary |
|---|---|
| public Map Implements abstract jakarta. Implementation Note Any values added to getResponseHeaders() will only be visible across multiple calls to this
method when servicing a resource request (i.e.
| |
| getURL | back to summary |
|---|---|
| public URL getURL() Implements abstract jakarta. Doc from jakarta.
Return an actual
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| initResourceInfo | back to summary |
|---|---|
| private void initResourceInfo() | |
| isResourceRequest | back to summary |
|---|---|
| private boolean isResourceRequest() | |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Implements java. Doc from java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| userAgentNeedsUpdate | back to summary |
|---|---|
| public boolean userAgentNeedsUpdate(FacesContext context) Implements abstract jakarta. Doc from jakarta.
Return
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Implements java. Doc from java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
| |