Examples of announce()


Examples of co.cask.tigon.api.flow.flowlet.FlowletContext.announce()

  @Override
  public void announceReady() {
    FlowletContext ctx = getContext();
    for (String key : dataIngestionPortsMap.keySet()) {
      portsAnnouncementList.add(ctx.announce(key, inputFlowletService.getDataPort(key)));
      LOG.info("Announced Data Port {} - {}", key, inputFlowletService.getDataPort(key));
    }
  }
}
View Full Code Here

Examples of com.gitblit.fanout.FanoutClient.announce()

    clientA.announce("a", "apple");
    clientA.announce("b", "banana");
    clientA.announce("c", "cantelope");

    clientB.announce("a", "avocado");
    clientB.announce("b", "beet");
    clientB.announce("c", "carrot");

    // give async messages a chance to be delivered
    Thread.sleep(2000);
View Full Code Here

Examples of com.gitblit.fanout.FanoutClient.announce()

    clientA.announce("a", "apple");
    clientA.announce("b", "banana");
    clientA.announce("c", "cantelope");

    clientB.announce("a", "avocado");
    clientB.announce("b", "beet");
    clientB.announce("c", "carrot");

    // give async messages a chance to be delivered
    Thread.sleep(2000);
View Full Code Here

Examples of com.gitblit.fanout.FanoutClient.announce()

    clientA.announce("b", "banana");
    clientA.announce("c", "cantelope");

    clientB.announce("a", "avocado");
    clientB.announce("b", "beet");
    clientB.announce("c", "carrot");

    // give async messages a chance to be delivered
    Thread.sleep(2000);

    // confirm that client B received client A's announcements
View Full Code Here

Examples of com.proofpoint.discovery.client.testing.InMemoryDiscoveryClient.announce()

    @Test
    public void testHttpSelectorString()
    {
        InMemoryDiscoveryClient discoveryClient = injector.getInstance(InMemoryDiscoveryClient.class);
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("http", "fake://server-http").build()));

        HttpServiceSelector selector = injector.getInstance(Key.get(HttpServiceSelector.class, serviceType("apple")));
        assertEquals(getOnlyElement(selector.selectHttpService()), URI.create("fake://server-http"));
    }
View Full Code Here

Examples of com.proofpoint.discovery.client.testing.InMemoryDiscoveryClient.announce()

                    }
                }
        );

        InMemoryDiscoveryClient discoveryClient = injector.getInstance(InMemoryDiscoveryClient.class);
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("http", "fake://server-http").build()));

        HttpServiceSelector selector = injector.getInstance(Key.get(HttpServiceSelector.class, serviceType("apple")));
        assertEquals(getOnlyElement(selector.selectHttpService()), URI.create("fake://server-http"));
    }
View Full Code Here

Examples of com.proofpoint.discovery.client.testing.InMemoryDiscoveryClient.announce()

    @Test
    public void testHttpsSelector()
    {
        InMemoryDiscoveryClient discoveryClient = injector.getInstance(InMemoryDiscoveryClient.class);
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("https", "fake://server-https").build()));

        HttpServiceSelector selector = injector.getInstance(Key.get(HttpServiceSelector.class, serviceType("apple")));
        assertEquals(getOnlyElement(selector.selectHttpService()), URI.create("fake://server-https"));
    }
View Full Code Here

Examples of com.proofpoint.discovery.client.testing.InMemoryDiscoveryClient.announce()

    @Test
    public void testFavorHttpsOverHttpSelector()
    {
        InMemoryDiscoveryClient discoveryClient = injector.getInstance(InMemoryDiscoveryClient.class);
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("http", "fake://server-http").build(),
                serviceAnnouncement("apple").addProperty("http", "fake://server-http-dontuse").addProperty("https", "fake://server-https").build()));

        HttpServiceSelector selector = injector.getInstance(Key.get(HttpServiceSelector.class, serviceType("apple")));
        assertEqualsIgnoreOrder(selector.selectHttpService(), ImmutableList.of(URI.create("fake://server-https"), URI.create("fake://server-http")));
    }
View Full Code Here

Examples of com.proofpoint.discovery.client.testing.InMemoryDiscoveryClient.announce()

    @Test
    public void testNoHttpServices()
    {
        InMemoryDiscoveryClient discoveryClient = injector.getInstance(InMemoryDiscoveryClient.class);
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("foo", "fake://server-https").build()));

        HttpServiceSelector selector = injector.getInstance(Key.get(HttpServiceSelector.class, serviceType("apple")));
        assertEquals(selector.selectHttpService(), ImmutableList.of());
    }
View Full Code Here

Examples of com.proofpoint.discovery.client.testing.InMemoryDiscoveryClient.announce()

    @Test
    public void testInvalidUris()
    {
        InMemoryDiscoveryClient discoveryClient = injector.getInstance(InMemoryDiscoveryClient.class);
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("http", ":::INVALID:::").build()));
        discoveryClient.announce(ImmutableSet.of(serviceAnnouncement("apple").addProperty("https", ":::INVALID:::").build()));

        HttpServiceSelector selector = injector.getInstance(Key.get(HttpServiceSelector.class, serviceType("apple")));
        assertEquals(selector.selectHttpService(), ImmutableList.of());
    }
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.