Interface DynamicContent
-
- All Superinterfaces:
Content
- All Known Implementing Classes:
CachingDynamicContentImpl
,SimpleDynamicContentImpl
public interface DynamicContent extends Content
Prescribes the contract for dynamic content.Each DynamicContent reports its MIME type (for use in setting the MIME type in the HTTP response back to the client).
Further, each DynamicContent object must return an "instance" which represents a version of the dynamic content at a given point in time. It is open to the implementer whether the DynamicContent returns a newly-created Instance each time or whether it caches some number of instances as an optimization.
- Author:
- tjquinn
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DynamicContent.Instance
Defines the contract for a given version of dynamic content at a single moment in time.static class
DynamicContent.InstanceAdapter
Convenience implementation of Instance.-
Nested classes/interfaces inherited from interface org.glassfish.appclient.server.core.jws.servedcontent.Content
Content.Adapter, Content.State
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DynamicContent.Instance
getExistingInstance(Properties tokenValues)
Retrieves an "instance" of this dynamic content, with placeholders substituted using the provided properties.String
getMimeType()
Retrieve the MIME type for this dynamic content.DynamicContent.Instance
getOrCreateInstance(Properties tokenValues)
Retrieves an existing "instance" of this dynamic content, with placeholders substituted, creating a new one if none already exists.boolean
isMain()
Reports whether this dynamic content represents the main JNLP document for an app client.
-
-
-
Method Detail
-
getExistingInstance
DynamicContent.Instance getExistingInstance(Properties tokenValues)
Retrieves an "instance" of this dynamic content, with placeholders substituted using the provided properties.- Parameters:
tokenValues
- maps placeholder tokens to values- Returns:
- matching Instance; null if no matching instance exists
-
getOrCreateInstance
DynamicContent.Instance getOrCreateInstance(Properties tokenValues)
Retrieves an existing "instance" of this dynamic content, with placeholders substituted, creating a new one if none already exists.- Parameters:
tokenValues
- maps placeholder tokens to values- Returns:
- matching or newly-created Instance
-
getMimeType
String getMimeType()
Retrieve the MIME type for this dynamic content.- Returns:
-
isMain
boolean isMain()
Reports whether this dynamic content represents the main JNLP document for an app client.- Returns:
-
-