ABOUT US

|

SUPPORT

|

BLOG

DOWNLOADS    

 

 

 

 


 

 

Threads and WebRenderer

 

 

 

 

 

 

The majority of WebRenderer is thread-safe, meaning that the majority of WebRenderer methods can be called from any thread.

The following events are fired in the WebRenderer thread:

BrowserListener.onLoadIntercept
NetworkListener.onHTTPInterceptHeaders
PromptListener.onPromptDialog 


You must thread any calls to WebRenderer methods that have return values (you must not block the WebRenderer thread) if calling WebRenderer methods within the above events.

Thread Example:

Thread thread = new Thread(new Runnable() {
        public void run() {
                // Call to WebRenderer methods with return values
        }
});
thread.start();


Note: Non-WebRenderer method calls do not need to be threaded if called within the methods listed above.

Methods fired in new Threads

The ProtocolListener.onOpen event is fired in a new thread each time.  This means you may have multiple calls to this running at the same time, and you must sychronize any shared data that is accessed. The thread created is destroyed after the firing of the onOpen method and the ProtocolEvent object is the reference for the protocol data (see custom protocols).

 

 

 

 

 

 

 

 

Copyright © JadeLiquid Software - www.jadeliquid.com