public interface SessionCtrl
Session
for implementation.
Note: applications shall never access this interface.
Modifier and Type | Method and Description |
---|---|
DesktopCache |
getDesktopCache()
Returns the desktop cache, or null if not available.
|
void |
invalidateNow()
Really invalidates the session.
|
boolean |
isInvalidated()
Returns whether this session is invalidated
(i.e.,
Session.invalidate() was called). |
boolean |
notifyClientRequest(boolean keepAlive)
Notifies the session that a client request is received.
|
void |
onDestroyed()
Called when the session is destroyed.
|
void |
recover(java.lang.Object nativeSession)
Called when ZK detects
Session.getNativeSession()
is not initialized properly. |
void |
setDesktopCache(DesktopCache cache)
Sets the desktop cache.
|
void |
setDeviceType(java.lang.String deviceType)
Sets the device type that this session belongs to.
|
void setDeviceType(java.lang.String deviceType)
It is called by the desktop when Desktop.setDeviceType(java.lang.String)
is called.
Don't call this method directly. Otherwise, the result is unpredictable.
DesktopCache getDesktopCache()
Note: this is an utility to implement DesktopCacheProvider
,
which might or might not use this method. Other part of ZK shall not
access this method.
void setDesktopCache(DesktopCache cache)
Note: this is an utility to implement DesktopCacheProvider
,
which might or might not use this method. Other part of ZK shall not
access this method.
cache
- the desktop cache; null to denote no cache available.void onDestroyed()
Application shall never access this method.
void recover(java.lang.Object nativeSession)
Session.getNativeSession()
is not initialized properly.
It is actually a workaround to solve the issue that some Web container fails to call HttpSessionActivationListener.sessionDidActivate() upon failover.
It can be used to solve the issue that the mapping between the native session and the ZK session is changed. For example, you might manually invalidate the http session and recreate one. Then, you have to call this method to associate the ZK session with the new created session.
boolean isInvalidated()
Session.invalidate()
was called).
Note: ZK doesn't invalidate it immediately (until the event has been processed), so the session might be still alive.
void invalidateNow()
Application shall never access this method.
boolean notifyClientRequest(boolean keepAlive)
keepAlive
- if the request will keep the session alive,
or the request shall be ignored.
If the request shall be ignored and the session is timeout,
it will cause the session to expire (i.e., be invalidated).Copyright © 2005-2023 Potix Corporation. All Rights Reserved.