T
- The type of the connection object.public interface IConnectionAdapter<T> extends IVizUpdateable
IUpdateableListener
s (see also:
IConnectionClient
).iComponentListener
Modifier and Type | Method and Description |
---|---|
boolean |
connect()
Connects to the associated connection if not already connected or
connecting.
|
boolean |
connect(boolean block)
Connects to the associated connection if not already connected or
connecting.
|
boolean |
disconnect()
Disconnects the associated connection if not already disconnected.
|
boolean |
disconnect(boolean block)
Disconnects the associated connection if not already disconnected.
|
T |
getConnection()
Gets the connection managed by this adapter.
|
java.lang.String |
getConnectionProperty(java.lang.String key)
Gets the connection property corresponding to the specified key.
|
java.lang.String |
getHost()
A convenience method to get the host for the connection.
|
java.lang.String |
getKey()
Gets the key currently associated with this connection.
|
int |
getPort()
A convenience method to get the port for the connection.
|
ConnectionState |
getState()
Gets the current state of the associated connection.
|
boolean |
isRemote()
A convenience method to determine whether the associated connection is to
a remote device.
|
boolean |
setConnectionProperties(java.util.List<VizEntry> properties)
Sets the connection's required properties based on the provided list of
Entry s (usually a row from a ConnectionTable ). |
register, unregister, update
boolean connect()
Note:This method will not block the caller thread, so it is the
same as calling connect(false)
.
boolean connect(boolean block)
block
- If true, then the calling thread will be blocked until the
connection succeeds or fails. If false, then the connection
process will not block the calling thread.boolean disconnect()
Note:This method will not block the caller thread, so it is the
same as calling disconnect(false)
.
boolean disconnect(boolean block)
block
- If true, then the calling thread will be blocked until the
disconnection succeeds or fails. If false, then the
disconnection process will not block the calling thread.T getConnection()
java.lang.String getConnectionProperty(java.lang.String key)
key
- The key or ID of the required connection property.null
if the key
did not exist.java.lang.String getKey()
ConnectionState getState()
boolean setConnectionProperties(java.util.List<VizEntry> properties)
Entry
s (usually a row from a ConnectionTable
).
The associated connection should not be reset if the connection properties have changed.
properties
- The list of new connection properties.java.lang.String getHost()
int getPort()
boolean isRemote()