@Test public void testVipBasedInterest() throws Exception { Interest<InstanceInfo> interest = Interests.forVips("test-vip"); Mockito.when(clientMock.forInterest(interest)).thenReturn(Observable.just(ADD_INSTANCE_1, ADD_INSTANCE_2)); List<Instance<SocketAddress>> instances = membershipSource .forInterest(interest) .take(2) .toList().toBlocking() .toFuture() .get(1, TimeUnit.SECONDS); Assert.assertEquals(2, instances.size()); System.out.println("instances = " + instances); }
public Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest) { return forInterest(interest, defaultMapper); }
Eureka2InterestManager { public Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest) { return forInterest(interest, defaultMapper); } }
Eureka2InterestManager { public Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest) { return forInterest(interest, defaultMapper); } Eureka2InterestManager(ServerResolver eurekaResolver); @Inject  Eureka2InterestManager(EurekaInterestClient client); }
Eureka2InterestManager { public Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest) { return forInterest(interest, defaultMapper); } Eureka2InterestManager(ServerResolver eurekaResolver); @Inject  Eureka2InterestManager(EurekaInterestClient client); Observable<Instance<SocketAddress>> forVip(String... vips); Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest); Observable<Instance<SocketAddress>> forInterest(final Interest<InstanceInfo> interest,
                                                           final Func1<InstanceInfo, SocketAddress> instanceInfoToHost); }
Eureka2InterestManager { public Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest) { return forInterest(interest, defaultMapper); } Eureka2InterestManager(ServerResolver eurekaResolver); @Inject  Eureka2InterestManager(EurekaInterestClient client); Observable<Instance<SocketAddress>> forVip(String... vips); Observable<Instance<SocketAddress>> forInterest(Interest<InstanceInfo> interest); Observable<Instance<SocketAddress>> forInterest(final Interest<InstanceInfo> interest,
                                                           final Func1<InstanceInfo, SocketAddress> instanceInfoToHost);  }