public class ConnectionHolder extends AbstractPropertyChange implements ConnectionStateListener, org.eclipse.core.runtime.IAdaptable
Modifier and Type | Field and Description |
---|---|
static String |
PROP_CONNECTION_ERROR |
static String |
PROP_CONNECTION_SERVICE |
static String |
PROP_CONNECTION_STATE |
Constructor and Description |
---|
ConnectionHolder(ConnectionDiscovererBean discoverer,
ConnectionDescriptor info) |
Modifier and Type | Method and Description |
---|---|
void |
connect() |
void |
connect(DisplayCallbackHandler callbackHandler) |
void |
disconnect() |
void |
dispose() |
Object |
getAdapter(Class adapter) |
Throwable |
getConnectionError() |
ConnectionDescriptor |
getConnectionInformation() |
ConnectionService |
getConnectionService() |
ConnectionState |
getConnectionState() |
ConnectionDiscovererBean |
getDiscoverer() |
void |
setConnectCallbackHandler(CallbackHandler callbackHandler) |
protected void |
setConnectionError(Throwable connectionError) |
protected void |
setConnectionService(ConnectionService connectionService) |
protected void |
setConnectionState(ConnectionState connectionState) |
void |
stateChange(Connection connection,
ConnectionState state,
Throwable error)
Notify a state change
|
String |
toString() |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
public static final String PROP_CONNECTION_SERVICE
public static final String PROP_CONNECTION_STATE
public static final String PROP_CONNECTION_ERROR
public ConnectionHolder(ConnectionDiscovererBean discoverer, ConnectionDescriptor info)
public void connect()
public void disconnect()
public ConnectionDiscovererBean getDiscoverer()
public void dispose()
public ConnectionService getConnectionService()
public ConnectionDescriptor getConnectionInformation()
public ConnectionState getConnectionState()
protected void setConnectionState(ConnectionState connectionState)
public Throwable getConnectionError()
protected void setConnectionService(ConnectionService connectionService)
protected void setConnectionError(Throwable connectionError)
public void stateChange(Connection connection, ConnectionState state, Throwable error)
ConnectionStateListener
stateChange
in interface ConnectionStateListener
connection
- the connection that changedstate
- the new state of the connectionerror
- some error information that lead to the new state (can be null
if it was not an error)public Object getAdapter(Class adapter)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
public void setConnectCallbackHandler(CallbackHandler callbackHandler)
public void connect(DisplayCallbackHandler callbackHandler)