public abstract class AbstractRegistrySourceConnector extends java.lang.Object implements IRegistrySourceConnector
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<IConnectorListener> |
listeners |
Constructor and Description |
---|
AbstractRegistrySourceConnector(java.lang.String identifier,
boolean includeInDefaultViews)
Creates an instance of the connector with the given identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(IConnectorListener listener)
Add a listener to get updates on changes in the query specifications available from the connector.
|
java.lang.String |
getIdentifier()
The connector must return the same identifier every time it is invoked!
|
boolean |
includeSpecificationsInDefaultViews() |
void |
removeListener(IConnectorListener listener)
Removes an already registered listener and stops sending updates.
|
protected abstract void |
sendQuerySpecificationsToListener(IConnectorListener listener)
Subclasses should send add notifications for each specification in the connector to the given listener.
|
protected java.util.Set<IConnectorListener> listeners
public AbstractRegistrySourceConnector(java.lang.String identifier, boolean includeInDefaultViews)
identifier
- of the newly created connectorincludeInDefaultViews
- true if the specifications in the connector should be included in default viewspublic java.lang.String getIdentifier()
IRegistrySourceConnector
getIdentifier
in interface IRegistrySourceConnector
public boolean includeSpecificationsInDefaultViews()
includeSpecificationsInDefaultViews
in interface IRegistrySourceConnector
public void addListener(IConnectorListener listener)
IRegistrySourceConnector
addListener
in interface IRegistrySourceConnector
listener
- that should be addedpublic void removeListener(IConnectorListener listener)
IRegistrySourceConnector
removeListener
in interface IRegistrySourceConnector
listener
- that should be removedprotected abstract void sendQuerySpecificationsToListener(IConnectorListener listener)
listener
- that should receive the notifications