T
- The type of the underlying connection widget.public abstract class VizConnectionManager<T> extends java.lang.Object implements IVizConnectionManager<T>
IVizConnectionManager
,
which is responsible for synchronizing IVizConnection
s with Eclipse
preferences.DEFAULT_CONNECTION_PREFERENCE_DELIMITER
Constructor and Description |
---|
VizConnectionManager()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
IVizConnection<T> |
getConnection(java.lang.String name)
Gets the viz connection with the specified name.
|
java.util.Set<java.lang.String> |
getConnections()
Gets the names of all available connections.
|
java.util.Set<java.lang.String> |
getConnectionsForHost(java.lang.String host)
Gets all connections available for the specified host.
|
java.util.ArrayList<java.util.concurrent.Future<ConnectionState>> |
setPreferenceStore(CustomScopedPreferenceStore store,
java.lang.String preferenceNodeId)
Sets the preference store used by the manager.
|
public IVizConnection<T> getConnection(java.lang.String name)
IVizConnectionManager
IVizConnectionManager.getConnections()
or
IVizConnectionManager.getConnectionsForHost(String)
.getConnection
in interface IVizConnectionManager<T>
name
- The name of the connection to acquire.null
if there is no
connection for the specified name.public java.util.Set<java.lang.String> getConnections()
IVizConnectionManager
getConnections
in interface IVizConnectionManager<T>
public java.util.Set<java.lang.String> getConnectionsForHost(java.lang.String host) throws java.lang.NullPointerException
IVizConnectionManager
getConnectionsForHost
in interface IVizConnectionManager<T>
host
- The host machine. Must not be null
, but may be
"localhost" or otherwise a resolvable hostname.java.lang.NullPointerException
- If the specified host is null
.public java.util.ArrayList<java.util.concurrent.Future<ConnectionState>> setPreferenceStore(CustomScopedPreferenceStore store, java.lang.String preferenceNodeId) throws java.lang.NullPointerException
IVizConnectionManager
setPreferenceStore
in interface IVizConnectionManager<T>
store
- The new store. Should not be null
.preferenceNodeId
- The ID of the preference node. Connection preferences will be
found under this node. Should not be null
.java.lang.NullPointerException
- If the preference node ID is null
and the store is
not.