Package org.eclipse.ecf.discovery

Examples of org.eclipse.ecf.discovery.IServiceInfo


      fireServiceDiscovered(new ServiceContainerEvent(iinfo, getID()));
    }
  }

  public void fireServiceRemoved(URI anURI, IServiceTypeID id) {
    IServiceInfo iinfo = new ServiceInfo(anURI, "", id); //$NON-NLS-1$
    if(knownServices.remove(iinfo)) {
      fireServiceUndiscovered(new ServiceContainerEvent(iinfo, getID()));
    }
  }
View Full Code Here


  /* (non-Javadoc)
   * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
   */
  public Object execute(ExecutionEvent event) throws ExecutionException {
    // get service
    final IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
    final URI location = serviceInfo.getLocation();
   
    // open browser view or reuse existing if already open
    final IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
    try {
      final URL url = location.toURL();
View Full Code Here

        if (removedServices.containsKey(url)) {
          removedServices.remove(url);
        } else { // we don't know the service, so we need to create the
          final ServicePropertiesAdapter spa = new ServicePropertiesAdapter((List) entry.getValue());
          final String serviceName = spa.getServiceName() == null ? url.toString() : spa.getServiceName();
          final IServiceInfo serviceInfo = new JSLPServiceInfo(serviceName, new ServiceURLAdapter(url), spa.getPriority(), spa.getWeight(), spa);
          services.put(url, serviceInfo);
          discoveryContainer.fireServiceTypeDiscovered(serviceInfo.getServiceID().getServiceTypeID());
          discoveryContainer.fireServiceDiscovered(serviceInfo);
        }
        monitor.worked(1);
      }
      // at this point removedServices only contains stale services
      for (final Iterator itr = removedServices.entrySet().iterator(); itr.hasNext() && !monitor.isCanceled();) {
        final Map.Entry entry = (Map.Entry) itr.next();
        final Object key = entry.getKey();
        final IServiceInfo value = (IServiceInfo) entry.getValue();
        discoveryContainer.fireServiceUndiscovered(value);
        services.remove(key);
        monitor.worked(1);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.discovery.IServiceInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.