diff options
author | slewis | 2007-05-27 21:48:38 +0000 |
---|---|---|
committer | slewis | 2007-05-27 21:48:38 +0000 |
commit | a698ea58333dc0aa2e63f9ff0254bb347e8c9dc7 (patch) | |
tree | 82c2e5ce3aac7604eaffe8de994ab7b8dab3249b /framework/bundles | |
parent | edca9010c3faf4176da17246bbe721d679ecbdad (diff) | |
download | org.eclipse.ecf-a698ea58333dc0aa2e63f9ff0254bb347e8c9dc7.tar.gz org.eclipse.ecf-a698ea58333dc0aa2e63f9ff0254bb347e8c9dc7.tar.xz org.eclipse.ecf-a698ea58333dc0aa2e63f9ff0254bb347e8c9dc7.zip |
Added documentation for listeners (asynchronous invocation).
Diffstat (limited to 'framework/bundles')
2 files changed, 44 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java index b55972ad7..6b9ff2e84 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java @@ -12,6 +12,28 @@ package org.eclipse.ecf.discovery; /** * Listener for receiving service events * + * <p> + * </p> + * Note these methods will be called asynchronously when notifications of remote + * changes are received by the provider implementation code. The provider is + * free to call the methods below with an arbitrary thread, so the + * implementation of these methods must be appropriately prepared. + * <p> + * </p> + * For example, if the code implementing any of these methods must interact with + * user interface code, then it should use code such as the following to execute + * on the SWT UI thread: + * + * <pre> + * Display.getDefault().asyncExec(new Runnable() { + * public void run() { + * ... UI code here + * } + * }); + * </pre> + * + * Further, the code in the implementations of these methods should <b>not block</b> + * via I/O operations or blocking UI calls. */ public interface IServiceListener { /** diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java index e6a04664c..5009f78bf 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java @@ -11,6 +11,28 @@ package org.eclipse.ecf.discovery; /** * Listener for service type notifications + * <p> + * </p> + * Note these methods will be called asynchronously when notifications of remote + * changes are received by the provider implementation code. The provider is + * free to call the methods below with an arbitrary thread, so the + * implementation of these methods must be appropriately prepared. + * <p> + * </p> + * For example, if the code implementing any of these methods must interact with + * user interface code, then it should use code such as the following to execute + * on the SWT UI thread: + * + * <pre> + * Display.getDefault().asyncExec(new Runnable() { + * public void run() { + * ... UI code here + * } + * }); + * </pre> + * + * Further, the code in the implementations of these methods should <b>not block</b> + * via I/O operations or blocking UI calls. */ public interface IServiceTypeListener { /** |