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
    • 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: