|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.server.AbstractClientConnector com.vaadin.server.AbstractExtension com.vaadin.addon.touchkit.extensions.OfflineMode
public class OfflineMode
The OfflineMode extension adds offline support for the application. Settings for offline mode can be accessed through this class and offline mode can be triggered even though the network connection is still online.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener |
Constructor Summary | |
---|---|
OfflineMode()
|
Method Summary | |
---|---|
void |
beforeClientResponse(boolean initial)
|
void |
extend(com.vaadin.ui.UI ui)
|
int |
getOfflineModeTimeout()
Returns the amount of seconds the client side waits for requests to return a response from the server until it opens the offline mode. |
protected OfflineModeState |
getState()
|
void |
goOffline()
Instructs the client side to go into offline mode. |
boolean |
isOfflineModeEnabled()
|
boolean |
isPersistentSessionCookie()
Vaadin uses the servlet's session mechanism to track users. |
void |
setOfflineModeEnabled(boolean offlineModeEnabled)
Enable or disable offline mode for the application. |
void |
setOfflineModeTimeout(int offlineModeTimeout)
Sets the timeout for how long the client side waits for the server to respond before falling back to offline mode. |
void |
setPersistentSessionCookie(boolean persistentSessionCookie)
Vaadin uses the servlet's session mechanism to track users. |
Methods inherited from class com.vaadin.server.AbstractExtension |
---|
extend, getParent, getSupportedParentType, remove, setParent |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
---|
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, createState, detach, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, attach, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Constructor Detail |
---|
public OfflineMode()
Method Detail |
---|
protected OfflineModeState getState()
getState
in class com.vaadin.server.AbstractClientConnector
public boolean isOfflineModeEnabled()
public void setOfflineModeEnabled(boolean offlineModeEnabled)
offlineModeEnabled
- true to enable, false to disable.public int getOfflineModeTimeout()
public void setOfflineModeTimeout(int offlineModeTimeout)
offlineModeTimeout
- timeout in seconds, -1 to disable the timeout.public boolean isPersistentSessionCookie()
The persistent session cookie is on by default if the UI uses the
PreserveOnRefresh
annotation.
public void setPersistentSessionCookie(boolean persistentSessionCookie)
This method makes the session cookie persistent. A returning user can then be shown his/her previous UI state.
The persistent session cookie is on by default if the UI uses the
PreserveOnRefresh
annotation. It is suggested to be used with
TouchKit applications that might be used as home screen apps.
Note that the normal session lifetime is still respected although persistent cookies are in use.
persistentSessionCookie
- true if persistent session cookies should be usedpublic void beforeClientResponse(boolean initial)
beforeClientResponse
in interface com.vaadin.server.ClientConnector
beforeClientResponse
in class com.vaadin.server.AbstractClientConnector
public void goOffline()
public void extend(com.vaadin.ui.UI ui)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |