Search in sources :

Example 1 with IProgressRunnable

use of org.eclipse.equinox.concurrent.future.IProgressRunnable in project ecf by eclipse.

the class EndpointDescriptionLocator method processInitialLocatorServices.

private void processInitialLocatorServices(final IDiscoveryLocator locator, final LocatorServiceListener locatorListener) {
    IProgressRunnable runnable = new IProgressRunnable() {

        public Object run(IProgressMonitor arg0) throws Exception {
            IServiceInfo[] serviceInfos = null;
            try {
                serviceInfos = locator.getServices();
            } catch (Exception e) {
                logError("processInitialLocatorServices", "Exception in locator.getServices()", // $NON-NLS-1$ //$NON-NLS-2$
                e);
            }
            if (serviceInfos != null)
                for (int i = 0; i < serviceInfos.length; i++) {
                    locatorListener.handleService(serviceInfos[i], true);
                }
            return null;
        }
    };
    executor.execute(runnable, null);
}
Also used : IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) IServiceInfo(org.eclipse.ecf.discovery.IServiceInfo) IProgressRunnable(org.eclipse.equinox.concurrent.future.IProgressRunnable) FileNotFoundException(java.io.FileNotFoundException) IOException(java.io.IOException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 IServiceInfo (org.eclipse.ecf.discovery.IServiceInfo)1 IProgressRunnable (org.eclipse.equinox.concurrent.future.IProgressRunnable)1