Package io.guise.framework.platform.web
Class AbstractWebPlatform
- java.lang.Object
-
- io.guise.framework.platform.AbstractPlatform
-
- io.guise.framework.platform.web.AbstractWebPlatform
-
- All Implemented Interfaces:
Platform
,WebPlatform
- Direct Known Subclasses:
HTTPServletWebPlatform
public abstract class AbstractWebPlatform extends AbstractPlatform implements WebPlatform
An abstract implementation of a web platform for Guise. This class registers no depictors.- Author:
- Garret Wilson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.guise.framework.platform.web.WebPlatform
WebPlatform.HTMLEditor, WebPlatform.PollCommand
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_POLL_INTERVAL
The default polling interval in milliseconds.protected static java.lang.String
DEPICT_ID_STRING_PREFIX
The prefix used for creating depict ID strings on this platform.-
Fields inherited from interface io.guise.framework.platform.web.WebPlatform
AJAX_JAVASCRIPT_PATH, AJAX_MIN_JAVASCRIPT_PATH, ATTRIBUTE_ATTRIBUTE_HASH, ATTRIBUTE_CLASS_CONTENT, ATTRIBUTE_CONTENT_HASH, ATTRIBUTE_CONTENT_TYPE, ATTRIBUTE_PATCH_TYPE, ATTRIBUTE_PATCH_TYPE_NO_VALUE, ATTRIBUTE_PATCH_TYPE_NONE, ATTRIBUTE_PATCH_TYPE_TEMP, BLANK_MP3_PATH, CKEDITOR_JAVASCRIPT_PATH, CKEDITOR_MIN_JAVASCRIPT_PATH, CKEDITOR_VERSION, DOM_JAVASCRIPT_PATH, DOM_MIN_JAVASCRIPT_PATH, DOMREADY_JAVASCRIPT_PATH, DOMREADY_MIN_JAVASCRIPT_PATH, ELEMENT_IMG_ATTRIBUTE_ORIGINAL_SRC, ELEMENT_IMG_ATTRIBUTE_ROLLOVER_SRC, ELEMENT_TEXTAREA_ATTRIBUTE_MULTILINE, GOOGLE_GEARS_JAVASCRIPT_PATH, GOOGLE_GEARS_MIN_JAVASCRIPT_PATH, GUISE_AJAX_REQUEST_MEDIA_TYPE, GUISE_AJAX_RESPONSE_MEDIA_TYPE, GUISE_EMPTY_HTML_DOCUMENT_PATH, GUISE_FLASH_PATH, GUISE_JAVASCRIPT_PATH, GUISE_MIN_JAVASCRIPT_PATH, GUISE_ML_NAMESPACE_PREFIX, GUISE_ML_NAMESPACE_URI, GUISE_SESSION_UUID_URI_QUERY_PARAMETER, GUISE_VERSION_URI_QUERY_PARAMETER, GUISE_XHTML_DTD_PUBLIC_ID, HTML_EDITOR, JAVASCRIPT_JAVASCRIPT_PATH, JAVASCRIPT_MIN_JAVASCRIPT_PATH, TINYMCE_JAVASCRIPT_PATH, TINYMCE_MIN_JAVASCRIPT_PATH
-
-
Constructor Summary
Constructors Constructor Description AbstractWebPlatform(GuiseApplication application)
Application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
discontinuePollInterval(DepictedObject depictedObject)
Indicates that a depicted object no longer requests a particular polling interval.long
getDepictID(java.lang.String depictIDString)
Returns the depicted object ID represented by the given platform-specific ID string.java.lang.String
getDepictIDString(long depictID)
Generates an ID for the given depicted object appropriate for using on the platform.Environment
getEnvironment()
int
getPollInterval()
java.util.Queue<WebPlatformMessage>
getSendMessageQueue()
boolean
requestPollInterval(DepictedObject depictedObject, int pollInterval)
Requests a polling interval for a given depicted object.void
setPollInterval(int newPollInterval)
Sets the polling interval in milliseconds.-
Methods inherited from class io.guise.framework.platform.AbstractPlatform
generateDepictID, getApplication, getDepictedObject, getDepictLock, getDepictor, getDepictorClass, getRegisteredDepictorClass, registerDepictedObject, registerDepictorClass, unregisterDepictedObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.guise.framework.platform.Platform
generateDepictID, getApplication, getDepictedObject, getDepictLock, getDepictor, registerDepictedObject, selectPlatformFiles, sendResource, sendResource, sendResource, sendResource, unregisterDepictedObject
-
Methods inherited from interface io.guise.framework.platform.web.WebPlatform
getClientProduct, getDepictContext
-
-
-
-
Field Detail
-
DEPICT_ID_STRING_PREFIX
protected static final java.lang.String DEPICT_ID_STRING_PREFIX
The prefix used for creating depict ID strings on this platform.- See Also:
- Constant Field Values
-
DEFAULT_POLL_INTERVAL
public static final int DEFAULT_POLL_INTERVAL
The default polling interval in milliseconds.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractWebPlatform
public AbstractWebPlatform(GuiseApplication application)
Application. This version copies the current application environment to a new environment for this platform.- Parameters:
application
- The Guise application running on this platform.- Throws:
java.lang.NullPointerException
- if the given application isnull
.
-
-
Method Detail
-
getEnvironment
public Environment getEnvironment()
- Specified by:
getEnvironment
in interfacePlatform
- Returns:
- The user local environment.
-
getSendMessageQueue
public java.util.Queue<WebPlatformMessage> getSendMessageQueue()
- Specified by:
getSendMessageQueue
in interfacePlatform
- Specified by:
getSendMessageQueue
in interfaceWebPlatform
- Overrides:
getSendMessageQueue
in classAbstractPlatform
- Returns:
- The thread-safe queue of messages to be delivered to the platform.
-
getPollInterval
public int getPollInterval()
- Specified by:
getPollInterval
in interfaceWebPlatform
- Returns:
- The current polling interval in milliseconds.
-
setPollInterval
public void setPollInterval(int newPollInterval)
Description copied from interface:WebPlatform
Sets the polling interval in milliseconds.- Specified by:
setPollInterval
in interfaceWebPlatform
- Parameters:
newPollInterval
- The polling interval in milliseconds.
-
requestPollInterval
public boolean requestPollInterval(DepictedObject depictedObject, int pollInterval)
Description copied from interface:WebPlatform
Requests a polling interval for a given depicted object. The actual polling interval will be updated if the given polling interval is smaller than the current actual polling interval.- Specified by:
requestPollInterval
in interfaceWebPlatform
- Parameters:
depictedObject
- The depicted object requesting a polling interval.pollInterval
- The polling interval in milliseconds.- Returns:
true
if the polling interval changed as a result of this request.- See Also:
WebPlatform.discontinuePollInterval(DepictedObject)
,WebPlatform.getPollInterval()
,WebPlatform.setPollInterval(int)
-
discontinuePollInterval
public boolean discontinuePollInterval(DepictedObject depictedObject)
Description copied from interface:WebPlatform
Indicates that a depicted object no longer requests a particular polling interval. The actual polling interval will be updated if the relinquished poll interval is less than or equal to the current poll interval.- Specified by:
discontinuePollInterval
in interfaceWebPlatform
- Parameters:
depictedObject
- The depicted object that is relinquishing a polling interval.- Returns:
true
if the polling interval changed as a result of this relinquishment.- See Also:
WebPlatform.requestPollInterval(DepictedObject, int)
,WebPlatform.getPollInterval()
,WebPlatform.setPollInterval(int)
-
getDepictIDString
public java.lang.String getDepictIDString(long depictID)
Generates an ID for the given depicted object appropriate for using on the platform.- Specified by:
getDepictIDString
in interfaceWebPlatform
- Parameters:
depictID
- The depict ID to be converted to a platform ID.- Returns:
- The form of the depict ID appropriate for using on the platform.
-
getDepictID
public long getDepictID(java.lang.String depictIDString)
Description copied from interface:WebPlatform
Returns the depicted object ID represented by the given platform-specific ID string.- Specified by:
getDepictID
in interfaceWebPlatform
- Parameters:
depictIDString
- The platform-specific form of the depict ID.- Returns:
- The depict ID the platform-specific form represents.
-
-