1

server push - desktop reference

asked 2014-01-02 21:17:56 +0800

shivak gravatar image shivak
21 3

I would like to push the data from other part of application to client UI. To push the data, it looks like I need to get hold of Desktop first and then enablePush. In my case, I have some server side events which change the data in database. As soon as this happens, I would like to modify the Desktop/UI. One way is to have Composer and and have a thread running frequently to check if there is any new Data. This Composer would have reference to DeskTop and so it is easy. Is there any way my server side code can get reference of this Composer ( and in turn the Desktop) and do UI update?

Typical way is to do it in Composer: Either sync /async

 desktop.enableServerPush(true);
 executor = SampleExecutorHolder.getExecutor();
 executor.execute(new SampleTask(input.getValue(), desktop, this));

I would like to do above from my server side code.. ( For example, As soon as data changes on Database) Is this possible? How do I get reference to a particular Desktop? Do you think this is a wrong architecture?

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-01-02 21:17:56 +0800

Seen: 9 times

Last updated: Jan 02 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More