Examples of JSLPServiceInfo


Examples of org.eclipse.ecf.provider.jslp.container.JSLPServiceInfo

   */
  public void testCreateByjSLPAndRemoveServicePrefix() throws ServiceLocationException {
    final String internalRep = "service:foo.eclipse:bar";
    final ServiceURL sUrl = new ServiceURL(internalRep + "://localhost:1234/a/path/to/something", ServiceURL.LIFETIME_PERMANENT);

    final IServiceInfo serviceInfo = new JSLPServiceInfo(DiscoveryTestHelper.SERVICENAME, new ServiceURLAdapter(sUrl), DiscoveryTestHelper.PRIORITY, DiscoveryTestHelper.WEIGHT, new ServicePropertiesAdapter(new ArrayList()));
    assertEquals(serviceInfo.getPriority(), DiscoveryTestHelper.PRIORITY);
    assertEquals(serviceInfo.getWeight(), DiscoveryTestHelper.WEIGHT);
    final IServiceID sid = serviceInfo.getServiceID();
    assertEquals(serviceInfo.getServiceName(), DiscoveryTestHelper.SERVICENAME);
    final IServiceTypeID stid = sid.getServiceTypeID();
   
    String internal = stid.getInternal();
    assertEquals(internalRep, internal);
    assertEquals("_foo._bar._" + IServiceTypeID.DEFAULT_PROTO[0] + "." + IServiceTypeID.DEFAULT_SCOPE[0] + "._eclipse", stid.getName());
View Full Code Here

Examples of org.eclipse.ecf.provider.jslp.container.JSLPServiceInfo

   */
  public void testCreateByjSLPAndRemoveServicePrefixWithServiceService() throws ServiceLocationException {
    final String internalRep = "service:service.eclipse:foo:bar";
    final ServiceURL sUrl = new ServiceURL(internalRep + "://localhost:1234/a/path/to/something", ServiceURL.LIFETIME_PERMANENT);

    final IServiceInfo serviceInfo = new JSLPServiceInfo(DiscoveryTestHelper.SERVICENAME, new ServiceURLAdapter(sUrl), DiscoveryTestHelper.PRIORITY, DiscoveryTestHelper.WEIGHT, new ServicePropertiesAdapter(new ArrayList()));
    assertEquals(serviceInfo.getPriority(), DiscoveryTestHelper.PRIORITY);
    assertEquals(serviceInfo.getWeight(), DiscoveryTestHelper.WEIGHT);
    final IServiceID sid = serviceInfo.getServiceID();
    assertEquals(serviceInfo.getServiceName(), DiscoveryTestHelper.SERVICENAME);
    final IServiceTypeID stid = sid.getServiceTypeID();
   
    assertEquals(internalRep, stid.getInternal());
    assertEquals("_service._foo._bar._" + IServiceTypeID.DEFAULT_PROTO[0] + "." + IServiceTypeID.DEFAULT_SCOPE[0] + "._eclipse", stid.getName());
   
View Full Code Here

Examples of org.eclipse.ecf.provider.jslp.container.JSLPServiceInfo

        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
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.