org.wings
Class Resource
java.lang.Object
org.wings.Resource
- All Implemented Interfaces:
- Serializable, Renderable, URLResource
- Direct Known Subclasses:
- DynamicResource, SByteArrayIcon, StaticResource, StringResource
public abstract class Resource
- extends Object
- implements Serializable, URLResource, Renderable
Wrapper to decorate various resource (i.e. images, files, scripts) with
a MIME type and make it accessible to the client via HTTP and the
ExternalizeManager.
- Author:
- Armin Haaf, Henner Zeller
- See Also:
- Serialized Form
|
Nested Class Summary |
static class |
Resource.HeaderEntry
Internal structure to manage HTTP headers which should be delivered with a resource to the client. |
id
protected String id
extension
protected String extension
mimeType
protected String mimeType
headers
protected Collection<HttpHeader> headers
Resource
protected Resource(String extension,
String mimeType)
Resource
protected Resource()
getLength
public int getLength()
getExtension
public String getExtension()
getMimeType
public String getMimeType()
- Returns the mime type of this resource.
setHeaders
public void setHeaders(Collection<HttpHeader> headers)
getHeaders
public Collection<HttpHeader> getHeaders()
getId
public String getId()
getURL
public abstract SimpleURL getURL()
- Description copied from interface:
URLResource
- returns the URL, this resource can be fetched from. This URL may
be relative, usually if generated from the externalizer.
- Specified by:
getURL in interface URLResource
toString
public String toString()
- Overrides:
toString in class Object
getSession
public Session getSession()
wingS Swings ;-)