0

How to speed up eventlistener?

asked 2016-06-20 10:05:03 +0800

DarkFoo gravatar image DarkFoo
1 1

Hello all,

I have a separate thread which informs an eventlister. For that I use in the thread the function:


Executions.schedule(desktop, listener, new Event("onNewData", null, entry));
 

In my viewmodel I created the listener which will be informed:


Desktop desktop = Executions.getCurrent().getDesktop();
if (!desktop.isServerPushEnabled()){
    desktop.enableServerPush(true);
}
Eventlistener listener = new Eventlistener(){
    @Override
    public void onEvent(Event event) throws Exception {
        // Here I get the event deferred
    }
}
 

The basic idea I have from here:

www.javacodegeeks.com/2012/09/advanced-zk-asynchronous-ui-updates-and.html

It works but deferred. I tried to make the eventlistener as deferrable = false but without luck. How can I speed up the event handling?

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: 2016-06-20 10:05:03 +0800

Seen: 7 times

Last updated: Jun 20 '16

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