org.wings.resource
Class DynamicResource

java.lang.Object
  extended by org.wings.Resource
      extended by org.wings.resource.DynamicResource
All Implemented Interfaces:
Serializable, Renderable, URLResource
Direct Known Subclasses:
ReloadResource, UpdateResource

public abstract class DynamicResource
extends Resource

Dynamic Resources are web resources representing rendered components and are individually loaded by Browsers as different 'files'. Dynamic Resources include therefore frames, cascading stylesheets or script files. The externalizer gives them a uniqe name. The resources may change in the consequence of some internal change of the components. This invalidation process yields a new 'version', called epoch here. The epoch is part of the externalized name.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.wings.Resource
Resource.HeaderEntry
 
Field Summary
 
Fields inherited from class org.wings.Resource
extension, headers, id, mimeType
 
Constructor Summary
  DynamicResource(SFrame frame)
           
  DynamicResource(SFrame frame, String extension, String mimeType)
           
protected DynamicResource(String extension, String mimeType)
           
 
Method Summary
 SFrame getFrame()
          Return the frame, to which this resource belongs.
 Collection<HttpHeader> getHeaders()
          Get additional http-headers.
 String getId()
           
 SimpleURL getURL()
          returns the URL, this resource can be fetched from.
 String toString()
           
 
Methods inherited from class org.wings.Resource
getExtension, getLength, getMimeType, getSession, setHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wings.Renderable
write
 

Constructor Detail

DynamicResource

protected DynamicResource(String extension,
                          String mimeType)

DynamicResource

public DynamicResource(SFrame frame)

DynamicResource

public DynamicResource(SFrame frame,
                       String extension,
                       String mimeType)
Method Detail

getFrame

public final SFrame getFrame()
Return the frame, to which this resource belongs.


getId

public String getId()
Overrides:
getId in class Resource

getURL

public 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
Specified by:
getURL in class Resource

toString

public String toString()
Overrides:
toString in class Resource

getHeaders

public Collection<HttpHeader> getHeaders()
Get additional http-headers. Returns null, if there are no additional headers to be set.

Overrides:
getHeaders in class Resource
Returns:
Set of Map.Entry (key-value pairs)


wingS Swings ;-)