Search in sources :

Example 21 with DataSourceDescriptor

use of org.jkiss.dbeaver.registry.DataSourceDescriptor in project dbeaver by serge-rider.

the class KeepAliveJob method run.

@Override
protected IStatus run(DBRProgressMonitor monitor) {
    if (DBeaverCore.isClosing()) {
        return Status.OK_STATUS;
    }
    final DBeaverCore core = DBeaverCore.getInstance();
    final ProjectRegistry projectRegistry = core.getProjectRegistry();
    if (projectRegistry == null) {
        return Status.OK_STATUS;
    }
    for (DataSourceDescriptor ds : DataSourceRegistry.getAllDataSources()) {
        checkDataSourceAlive(monitor, ds);
    }
    if (!DBeaverCore.isClosing()) {
        scheduleMonitor();
    }
    return Status.OK_STATUS;
}
Also used : DBeaverCore(org.jkiss.dbeaver.core.DBeaverCore) ProjectRegistry(org.jkiss.dbeaver.registry.ProjectRegistry) DataSourceDescriptor(org.jkiss.dbeaver.registry.DataSourceDescriptor)

Aggregations

DataSourceDescriptor (org.jkiss.dbeaver.registry.DataSourceDescriptor)21 InvocationTargetException (java.lang.reflect.InvocationTargetException)4 DBException (org.jkiss.dbeaver.DBException)4 DBPConnectionConfiguration (org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration)4 DriverDescriptor (org.jkiss.dbeaver.registry.driver.DriverDescriptor)4 IStatus (org.eclipse.core.runtime.IStatus)2 IJobChangeEvent (org.eclipse.core.runtime.jobs.IJobChangeEvent)2 JobChangeAdapter (org.eclipse.core.runtime.jobs.JobChangeAdapter)2 ModifyEvent (org.eclipse.swt.events.ModifyEvent)2 ModifyListener (org.eclipse.swt.events.ModifyListener)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Composite (org.eclipse.swt.widgets.Composite)2 Control (org.eclipse.swt.widgets.Control)2 DBPConnectionEventType (org.jkiss.dbeaver.model.connection.DBPConnectionEventType)2 DBRProgressMonitor (org.jkiss.dbeaver.model.runtime.DBRProgressMonitor)2 DBRRunnableWithProgress (org.jkiss.dbeaver.model.runtime.DBRRunnableWithProgress)2 DBSObjectContainer (org.jkiss.dbeaver.model.struct.DBSObjectContainer)2