Class SimpleDynamicContentImpl
- java.lang.Object
-
- org.glassfish.appclient.server.core.jws.servedcontent.Content.Adapter
-
- org.glassfish.appclient.server.core.jws.servedcontent.SimpleDynamicContentImpl
-
- All Implemented Interfaces:
Content
,DynamicContent
public class SimpleDynamicContentImpl extends Content.Adapter implements DynamicContent
- Author:
- Tim
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.appclient.server.core.jws.servedcontent.Content
Content.Adapter, Content.State
-
Nested classes/interfaces inherited from interface org.glassfish.appclient.server.core.jws.servedcontent.DynamicContent
DynamicContent.Instance, DynamicContent.InstanceAdapter
-
-
Constructor Summary
Constructors Constructor Description SimpleDynamicContentImpl(String template, String mimeType)
SimpleDynamicContentImpl(String template, String mimeType, boolean isMain)
-
Method Summary
All Methods Instance Methods Concrete 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.String
toString()
-
Methods inherited from class org.glassfish.appclient.server.core.jws.servedcontent.Content.Adapter
isAvailable, resume, start, state, stop, suspend
-
-
-
-
Method Detail
-
getExistingInstance
public DynamicContent.Instance getExistingInstance(Properties tokenValues)
Description copied from interface:DynamicContent
Retrieves an "instance" of this dynamic content, with placeholders substituted using the provided properties.- Specified by:
getExistingInstance
in interfaceDynamicContent
- Parameters:
tokenValues
- maps placeholder tokens to values- Returns:
- matching Instance; null if no matching instance exists
-
getOrCreateInstance
public DynamicContent.Instance getOrCreateInstance(Properties tokenValues)
Description copied from interface:DynamicContent
Retrieves an existing "instance" of this dynamic content, with placeholders substituted, creating a new one if none already exists.- Specified by:
getOrCreateInstance
in interfaceDynamicContent
- Parameters:
tokenValues
- maps placeholder tokens to values- Returns:
- matching or newly-created Instance
-
getMimeType
public String getMimeType()
Description copied from interface:DynamicContent
Retrieve the MIME type for this dynamic content.- Specified by:
getMimeType
in interfaceDynamicContent
- Returns:
-
isMain
public boolean isMain()
Description copied from interface:DynamicContent
Reports whether this dynamic content represents the main JNLP document for an app client.- Specified by:
isMain
in interfaceDynamicContent
- Returns:
-
-