public abstract class AbstractConnectionManager extends Object implements SingleServiceListener<DriverFactory>
Constructor and Description |
---|
AbstractConnectionManager(BundleContext context,
ConnectionInformation connectionInformation,
String connectionId,
Integer autoReconnectDelay,
boolean initialOpen) |
Modifier and Type | Method and Description |
---|---|
void |
addRequest(ConnectionRequest request) |
protected abstract AbstractConnectionService |
createConnection() |
void |
dispose()
Dispose the tracker and the connection
|
protected void |
disposeConnection()
Revoke the service registration and dispose the service
|
Integer |
getAutoReconnectDelay() |
ConnectionInformation |
getConnectionInformation() |
DriverFactory |
getFactory() |
protected abstract Set<String> |
getInterfaces() |
boolean |
isIdle() |
boolean |
isInitialOpen() |
void |
removeRequest(ConnectionRequest request) |
void |
serviceChange(ServiceReference<DriverFactory> reference,
DriverFactory factory)
The method is called when the service instance has changed
|
void |
update(ConnectionInformation connectionInformation) |
public AbstractConnectionManager(BundleContext context, ConnectionInformation connectionInformation, String connectionId, Integer autoReconnectDelay, boolean initialOpen)
public Integer getAutoReconnectDelay()
public boolean isInitialOpen()
public DriverFactory getFactory()
public ConnectionInformation getConnectionInformation()
public void dispose()
public void update(ConnectionInformation connectionInformation)
public void serviceChange(ServiceReference<DriverFactory> reference, DriverFactory factory)
SingleServiceListener
serviceChange
in interface SingleServiceListener<DriverFactory>
reference
- the new service reference or null
if no matching
service is availabefactory
- the new service instance or null
if no matching
service is availabeprotected abstract AbstractConnectionService createConnection()
protected void disposeConnection()
Does nothing if there is no current registration
public void addRequest(ConnectionRequest request)
public void removeRequest(ConnectionRequest request)
public boolean isIdle()