@Test public void itShouldNotBeCreatedWhenThereAreNoActiveSubSenders() { RpcClientConnectionPoolStub pool = new RpcClientConnectionPoolStub(); RpcStrategy firstValidResult = firstValidResult(servers(ADDRESS_1, ADDRESS_2, ADDRESS_3)); assertNull(firstValidResult.createSender(pool)); }
@Nullable @Override public RpcSender createSender(RpcClientConnectionPool pool) { List<RpcSender> senders = list.listOfSenders(pool); if (senders.size() == 0) return null; return new Sender(senders, resultValidator, noValidResultException); }
RpcStrategyFirstValidResult implements RpcStrategy { @Nullable @Override public RpcSender createSender(RpcClientConnectionPool pool) { List<RpcSender> senders = list.listOfSenders(pool); if (senders.size() == 0) return null; return new Sender(senders, resultValidator, noValidResultException); } }
RpcStrategyFirstValidResult implements RpcStrategy { @Nullable @Override public RpcSender createSender(RpcClientConnectionPool pool) { List<RpcSender> senders = list.listOfSenders(pool); if (senders.size() == 0) return null; return new Sender(senders, resultValidator, noValidResultException); } private  RpcStrategyFirstValidResult(RpcStrategyList list, ResultValidator<?> resultValidator,
			@Nullable StacklessException noValidResultException); }
RpcStrategyFirstValidResult implements RpcStrategy { @Nullable @Override public RpcSender createSender(RpcClientConnectionPool pool) { List<RpcSender> senders = list.listOfSenders(pool); if (senders.size() == 0) return null; return new Sender(senders, resultValidator, noValidResultException); } private  RpcStrategyFirstValidResult(RpcStrategyList list, ResultValidator<?> resultValidator,
			@Nullable StacklessException noValidResultException); static RpcStrategyFirstValidResult create(RpcStrategyList list); RpcStrategyFirstValidResult withResultValidator(@NotNull ResultValidator<?> resultValidator); RpcStrategyFirstValidResult withNoValidResultException(@NotNull StacklessException e); @Override Set<InetSocketAddress> getAddresses(); @Nullable @Override RpcSender createSender(RpcClientConnectionPool pool); }
RpcStrategyFirstValidResult implements RpcStrategy { @Nullable @Override public RpcSender createSender(RpcClientConnectionPool pool) { List<RpcSender> senders = list.listOfSenders(pool); if (senders.size() == 0) return null; return new Sender(senders, resultValidator, noValidResultException); } private  RpcStrategyFirstValidResult(RpcStrategyList list, ResultValidator<?> resultValidator,
			@Nullable StacklessException noValidResultException); static RpcStrategyFirstValidResult create(RpcStrategyList list); RpcStrategyFirstValidResult withResultValidator(@NotNull ResultValidator<?> resultValidator); RpcStrategyFirstValidResult withNoValidResultException(@NotNull StacklessException e); @Override Set<InetSocketAddress> getAddresses(); @Nullable @Override RpcSender createSender(RpcClientConnectionPool pool);  }