public abstract class AbstractSourceProvider extends Object implements ISourceProvider
An implementation of ISourceProvider that provides listener
support. Subclasses need only call fireSourceChanged whenever
appropriate.
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEBUG
Whether source providers should print out debugging information to the
console when events arrive.
|
| Constructor and Description |
|---|
AbstractSourceProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceProviderListener(ISourceProviderListener listener)
Adds a listener to this source provider.
|
protected void |
fireSourceChanged(int sourcePriority,
Map sourceValuesByName)
Notifies all listeners that multiple sources have changed.
|
protected void |
fireSourceChanged(int sourcePriority,
String sourceName,
Object sourceValue)
Notifies all listeners that a single source has changed.
|
protected void |
logDebuggingInfo(String message)
Logs a debugging message in an appropriate manner.
|
void |
removeSourceProviderListener(ISourceProviderListener listener)
Removes a listener from this source provider.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispose, getCurrentState, getProvidedSourceNamesprotected static boolean DEBUG
public final void addSourceProviderListener(ISourceProviderListener listener)
ISourceProvideraddSourceProviderListener in interface ISourceProviderlistener - The listener to add; must not be null.protected final void fireSourceChanged(int sourcePriority,
String sourceName,
Object sourceValue)
sourcePriority - The source priority that has changed.sourceName - The name of the source that has changed; must not be
null.sourceValue - The new value for the source; may be null.protected final void fireSourceChanged(int sourcePriority,
Map sourceValuesByName)
sourcePriority - The source priority that has changed.sourceValuesByName - The map of source names (String) to source
values (Object) that have changed; must not
be null. The names must not be
null, but the values may be null.protected final void logDebuggingInfo(String message)
null or the DEBUG is false,
then this method does nothing.message - The debugging message to log; if null, then
nothing is logged.public final void removeSourceProviderListener(ISourceProviderListener listener)
ISourceProviderremoveSourceProviderListener in interface ISourceProviderlistener - The listener to remove; must not be null.Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.