Package org.eclipse.ecf.discovery

Examples of org.eclipse.ecf.discovery.IServiceInfo


    assertTrue("Test misses " + ids.size() + " event(s) from container(s) out of " + idsToExpect + ". Those Ids are: " + ids, ids.size() == 0);
   
    assertEquals("Test listener received unexpected amount of discovery events: \n\t" + Arrays.asList(event), eventsToExpect, event.length);
    assertTrue("Discovery event must have originated from backend thread. Thread is: "
        + tsl.getCallingThread(), Thread.currentThread() != tsl.getCallingThread() && tsl.getCallingThread() != null);
    IServiceInfo serviceInfo2 = ((IServiceEvent) event[eventsToExpect - 1]).getServiceInfo();
    assertTrue("IServiceInfo should match, expected:\n\t" + serviceInfo + " but was \n\t" + serviceInfo2, comparator.compare(serviceInfo2, serviceInfo) == 0);
  }
View Full Code Here


    registration.unregister();
   
    IContainerEvent[] event = tsl.getEvent();
    assertNotNull("Test listener didn't receive any discovery event", event);
    assertEquals("Test listener received unexpected amount of discovery events: \n\t" + Arrays.asList(event), eventsToExpect, event.length);
    IServiceInfo serviceInfo2 = ((IServiceEvent) event[eventsToExpect - 1]).getServiceInfo();
    assertTrue("IServiceInfo should match, expected:\n\t" + serviceInfo + " but was \n\t" + serviceInfo2, comparator.compare(serviceInfo2, serviceInfo) == 0);
  }
View Full Code Here

    registration.unregister();
   
    IContainerEvent[] event = tsl.getEvent();
    assertNotNull("Test listener didn't receive discovery", event);
    assertEquals("Test listener received unexpected amount of discovery events: \n\t" + Arrays.asList(event), eventsToExpect, event.length);
    IServiceInfo serviceInfo2 = ((IServiceEvent) event[eventsToExpect - 1]).getServiceInfo();
    assertTrue("IServiceInfo should match, expected:\n\t" + serviceInfo + " but:\n\t" + serviceInfo2, comparator.compare(serviceInfo2, serviceInfo) == 0);
  }
View Full Code Here

    registration.unregister();
   
    IContainerEvent[] event = tsl.getEvent();
    assertNotNull("Test listener didn't receive discovery", event);
    assertEquals("Test listener received unexpected amount of discovery events: \n\t" + Arrays.asList(event), eventsToExpect, event.length);
    IServiceInfo serviceInfo2 = ((IServiceEvent) event[eventsToExpect - 1]).getServiceInfo();
    assertTrue("IServiceInfo should match, expected:\n\t" + serviceInfo + " but:\n\t" + serviceInfo2, comparator.compare(serviceInfo2, serviceInfo) == 0);
  }
View Full Code Here

    nodeWriter.publish();
  }

  public synchronized void unpublish(final String id) {
    Assert.isNotNull(id);
    IServiceInfo p = AdvertisedService.removePublished(id);
    if (p == null) {
      return;
    }
    NodeWriter nw = getNodeWriters().remove(id);
    if (nw != null) {
View Full Code Here

    Assert.isNotNull(discoveryAdvertiser);
    serviceInfoFactory = new ServiceInfoFactory();
  }
 
  public void testCreateServiceInfoFromMinimalEndpointDescription() throws Exception {
    IServiceInfo serviceInfo = createServiceInfoForDiscovery(createRequiredEndpointDescription());
    assertNotNull(serviceInfo);
  }
View Full Code Here

    IServiceInfo serviceInfo = createServiceInfoForDiscovery(createRequiredEndpointDescription());
    assertNotNull(serviceInfo);
  }
 
  public void testCreateServiceInfoFromFullEndpointDescription() throws Exception {
    IServiceInfo serviceInfo = createServiceInfoForDiscovery(createFullEndpointDescription());
    assertNotNull(serviceInfo);
  }
View Full Code Here

  }
 
  public void testCreateRequiredEndpointDescriptionFromServiceInfo() throws Exception {
    EndpointDescription published = createRequiredEndpointDescription();
    assertNotNull(published);
    IServiceInfo serviceInfo = createServiceInfoForDiscovery(published);
    assertNotNull(serviceInfo);
    org.osgi.service.remoteserviceadmin.EndpointDescription received = createEndpointDescriptionFromDiscovery(serviceInfo);
    assertNotNull(received);
    assertTrue(published.equals(received));
  }
View Full Code Here

  }

  public void testCreateFullEndpointDescriptionFromServiceInfo() throws Exception {
    EndpointDescription published = createFullEndpointDescription();
    assertNotNull(published);
    IServiceInfo serviceInfo = createServiceInfoForDiscovery(published);
    assertNotNull(serviceInfo);
    org.osgi.service.remoteserviceadmin.EndpointDescription received = createEndpointDescriptionFromDiscovery(serviceInfo);
    assertNotNull(received);
    assertTrue(published.equals(received));
  }
View Full Code Here

  public ID getConnectedID() {
    return getID();
  }

  public void fireServiceResolved(URI anURI, IServiceTypeID id) {
    IServiceInfo iinfo = new ServiceInfo(anURI, "", id); //$NON-NLS-1$
    if(knownServices.add(iinfo)) {
      fireServiceDiscovered(new ServiceContainerEvent(iinfo, getID()));
    }
  }
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.