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
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
Modifier and TypeFieldDescriptionstatic final int
The default polling interval in milliseconds.protected static final String
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
discontinuePollInterval
(DepictedObject depictedObject) Indicates that a depicted object no longer requests a particular polling interval.long
getDepictID
(String depictIDString) Returns the depicted object ID represented by the given platform-specific ID string.getDepictIDString
(long depictID) Generates an ID for the given depicted object appropriate for using on the platform.int
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 Details
-
DEPICT_ID_STRING_PREFIX
The prefix used for creating depict ID strings on this platform.- See Also:
-
DEFAULT_POLL_INTERVAL
public static final int DEFAULT_POLL_INTERVALThe default polling interval in milliseconds.- See Also:
-
-
Constructor Details
-
AbstractWebPlatform
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:
NullPointerException
- if the given application isnull
.
-
-
Method Details
-
getEnvironment
- Specified by:
getEnvironment
in interfacePlatform
- Returns:
- The user local environment.
-
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
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:
-
discontinuePollInterval
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:
-
getDepictIDString
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
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.
-