public abstract class AbstractConnectionDiscoverer extends Object implements ConnectionDiscoverer
Constructor and Description |
---|
AbstractConnectionDiscoverer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addConnection(ConnectionDescriptor connectionInformation)
Add and announce a new connection
|
void |
addConnectionListener(ConnectionDiscoveryListener listener)
Add a new listener to receive events.
|
void |
dispose() |
protected void |
fireDiscoveryUpdate(ConnectionDescriptor[] added,
ConnectionDescriptor[] removed) |
Set<ConnectionDescriptor> |
getConnections() |
protected boolean |
removeConnection(ConnectionDescriptor connectionInformation)
Remove a connection
|
void |
removeConnectionListener(ConnectionDiscoveryListener listener) |
protected void |
setConnections(Set<ConnectionDescriptor> result) |
protected void setConnections(Set<ConnectionDescriptor> result)
protected void fireDiscoveryUpdate(ConnectionDescriptor[] added, ConnectionDescriptor[] removed)
public void addConnectionListener(ConnectionDiscoveryListener listener)
ConnectionDiscoverer
If the connection discoverer already has discovered connections before the listener is added the already known connections are already sent to the listener.
addConnectionListener
in interface ConnectionDiscoverer
listener
- the listener to addpublic void removeConnectionListener(ConnectionDiscoveryListener listener)
removeConnectionListener
in interface ConnectionDiscoverer
protected boolean addConnection(ConnectionDescriptor connectionInformation)
The connection can also be null
in which the method will
return false
If the connection was already known, false
will be returned
and no event will be emitted
connectionInformation
- a new connectiontrue
if the new connection was addedprotected boolean removeConnection(ConnectionDescriptor connectionInformation)
The connection can also be null
in which the method will
return false
If the connection was not known, false
will be returned and
no event will be emitted
connectionInformation
- the connection to removetrue
if the connection was removedpublic Set<ConnectionDescriptor> getConnections()
public void dispose()
dispose
in interface org.eclipse.ui.services.IDisposable