|
Eclipse Rich Ajax Platform Release 1.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.rwt.lifecycle.UICallBack
A utility class that provides some static helper methods to perform commonly needed tasks with respect to background thread management.
| Method Summary | |
static void |
activate(String id)
To allow automatic UI-updates by server side background threads activate the UICallBack mechanism. |
static void |
deactivate(String id)
To allow automatic UI-updates by server side background threads activate the UICallBack mechanism. |
static void |
runNonUIThreadWithFakeContext(Display display,
Runnable runnable)
Sometimes a background thread needs to access values that are stored in the session object that started the thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void runNonUIThreadWithFakeContext(Display display,
Runnable runnable)
display - The display that is bound to the session that contains the
data to which the current thread should get access.runnable - The runnable that contains the critical code that
needs to have access to a request context.SessionSingletonBase,
org.eclipse.rwt.internal.service.ContextProviderpublic static void activate(String id)
deactivate(java.lang.String) at the end. Each activation
needs a session unique identifier as a kind of reference pointer to be able
to decide when all background threads are finished.
Note: this method can only be called in the UI-Thread of an RWT application.
id - A session unique identifier to trace the activation and
deactivation. Must not be null.Display.syncExec(java.lang.Runnable),
Display.asyncExec(java.lang.Runnable),
Display.getThread(),
Display.wake()public static void deactivate(String id)
deactivate(java.lang.String) method
before the start of a thread and deactivateUICallBack at the end. Each
activation needs a session unique identifier as a kind of reference pointer
to be able to decide when all background threads are finished.
Note: this method can only be called in the UI-Thread of an RWT application.
id - A session unique identifier to trace the activation and
deactivation. Must not be nullDisplay.syncExec(java.lang.Runnable),
Display.asyncExec(java.lang.Runnable),
Display.getThread(),
Display.wake()
|
Eclipse Rich Ajax Platform Release 1.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.