Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Automatic polling of user-intrface thread
Automatic polling of user-intrface thread [message #541775] Tue, 22 June 2010 13:41 Go to next message
Philipp Leusmann is currently offline Philipp LeusmannFriend
Messages: 36
Registered: July 2009
Member
Hi,

with respect to my previous posting "Custom event listeners in views"
(<hvq6lv$ovl$1@build.eclipse.org>) I just went a little different
approach using a Job polling for updates every period of time. This
seems to works quite well.

The Problem is, that in the Job I open a MessageDialog using
Display.asyncExec(), which will display on the next user interaction
with the GUI.
But I need the GUI to react instantly. Is there a way to make the user
interface poll for new Runnables in the asyncExec-queue?
I was thinnking RAP was using some kind of comet implementation to
achieve this. Am I wrong?

Thanks,
Philipp
Re: Automatic polling of user-intrface thread [message #541839 is a reply to message #541775] Tue, 22 June 2010 16:56 Go to previous messageGo to next message
Austin Riddle is currently offline Austin RiddleFriend
Messages: 128
Registered: July 2009
Senior Member
Hi Philipp,

What you probably want to use is a UICallback.

This RAP mechanism opens a Comet-style connection to the server, in which server updates can flow more freely.

The RAP FAQ explains how to properly use the UICallback.


Hope this helps.

[Updated on: Tue, 22 June 2010 16:59]

Report message to a moderator

Re: Automatic polling of user-intrface thread [message #542353 is a reply to message #541839] Thu, 24 June 2010 14:53 Go to previous messageGo to next message
Philipp Leusmann is currently offline Philipp LeusmannFriend
Messages: 36
Registered: July 2009
Member
Hi,

Am 22.06.10 18:56, schrieb Austin Riddle:
> Hi Philipp,
>
> What you probably want to use is a UICallback.

I tried UICallback, but if I understand correctly, it is still required
to use Display.asyncExec in the run()-loop of the callback thread. Which
results in showing a MessageDialog not before any user-interaction with
the GUI happened.

Please let me know, if my assumption is wrong.

Philipp
Re: Automatic polling of user-intrface thread [message #542383 is a reply to message #542353] Thu, 24 June 2010 16:32 Go to previous message
Austin Riddle is currently offline Austin RiddleFriend
Messages: 128
Registered: July 2009
Senior Member
Hi Philipp,

You are correct that to "push" an update from the server you need to have a reference to the display of the user session and call async() on it.

Hope this helps.
Previous Topic:BrowserFunktion and return value
Next Topic:Complete RAP Javadoc
Goto Forum:
  


Current Time: Sun Dec 05 05:02:19 GMT 2021

Powered by FUDForum. Page generated in 0.02097 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top