Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers.deferred
Interface IConcurrentModel

All Known Implementing Classes:
AbstractConcurrentModel, SetModel

public interface IConcurrentModel

Interface for a set of unordered elements that can fire change notifications. IConcurrentModel returns its contents asynchronous. Rather than implementing "get" methods, listeners can request an update and the model fires back information at its earliest convenience.

The model is allowed to send back notifications to its listeners in any thread, and the listeners must not assume that the notifications will arrive in the UI thread.

Not intended to be implemented by clients. Clients should subclass AbstractConcurrentModel instead.

Since:
3.1
Restriction:
This interface is not intended to be implemented by clients.

Method Summary
 void addListener ( IConcurrentModelListener listener)
          Adds a listener to this model.
 void removeListener ( IConcurrentModelListener listener)
          Removes a listener from this model.
 void requestUpdate ( IConcurrentModelListener listener)
          Requests that the receiver to call the given listener's setContents(...)
 

Method Detail

requestUpdate

void requestUpdate(
IConcurrentModelListener listener)
Requests that the receiver to call the given listener's setContents(...) method at its earliest convenience. The receiver is allowed to compute the elements asynchronously. That is, it can compute the result in a background thread and call setContents(...) once the result is ready. If the result is too large to return in one batch, it can call setContents with an empty array followed by a sequence of adds.

Has no effect if an update is already queued for an identical listener.

Parameters:
listener - listener whose setContents method should be called. The listener must have been previously registered with addListener.

addListener

void addListener(
IConcurrentModelListener listener)
Adds a listener to this model. The listener should be given the model's current contents (either through setContents or a sequence of adds) at the receiver's earliest convenience. The receiver will notify the listener about any changes in state until the listener is removed.

Has no effect if an identical listener is already registered.

Parameters:
listener - listener to add

removeListener

void removeListener(
IConcurrentModelListener listener)
Removes a listener from this model. The receiver will stop sending notifications to the given listener as soon as possible (although some additional notifications may still if arrive if the receiver was in the process of sending notifications in another thread). Any pending updates for this listener will be cancelled.

Has no effect if the given listener is not known to this model.

Parameters:
listener - listener to remove

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire