@Test public void testUrlBuilderBatchLimit_gh125() { StreamConfiguration et1 = new StreamConfiguration() .eventTypeName("et1") .batchLimit(0); assertEquals(baseUrl()+ "/event-types/et1/events", StreamResourceSupport.buildStreamUrl(client.baseURI(), et1)); }
static String buildStreamUrl(URI baseUri, StreamConfiguration sc) { UriBuilder uriBuilder = UriBuilder.builder(baseUri); if (sc.isSubscriptionStream()) { uriBuilder.path(PATH_SUBS).path(sc.subscriptionId()).path(PATH_EVENTS); uriBuilder = applySubscriptionQueryParamsTo(uriBuilder, sc); } else { uriBuilder.path(PATH_EVENT_TYPES).path(sc.eventTypeName()).path(PATH_EVENTS); uriBuilder = applyParamsTo(uriBuilder, sc); } return uriBuilder.buildString(); }
StreamResourceSupport { static String buildStreamUrl(URI baseUri, StreamConfiguration sc) { UriBuilder uriBuilder = UriBuilder.builder(baseUri); if (sc.isSubscriptionStream()) { uriBuilder.path(PATH_SUBS).path(sc.subscriptionId()).path(PATH_EVENTS); uriBuilder = applySubscriptionQueryParamsTo(uriBuilder, sc); } else { uriBuilder.path(PATH_EVENT_TYPES).path(sc.eventTypeName()).path(PATH_EVENTS); uriBuilder = applyParamsTo(uriBuilder, sc); } return uriBuilder.buildString(); } }
StreamResourceSupport { static String buildStreamUrl(URI baseUri, StreamConfiguration sc) { UriBuilder uriBuilder = UriBuilder.builder(baseUri); if (sc.isSubscriptionStream()) { uriBuilder.path(PATH_SUBS).path(sc.subscriptionId()).path(PATH_EVENTS); uriBuilder = applySubscriptionQueryParamsTo(uriBuilder, sc); } else { uriBuilder.path(PATH_EVENT_TYPES).path(sc.eventTypeName()).path(PATH_EVENTS); uriBuilder = applyParamsTo(uriBuilder, sc); } return uriBuilder.buildString(); }  }
StreamResourceSupport { static String buildStreamUrl(URI baseUri, StreamConfiguration sc) { UriBuilder uriBuilder = UriBuilder.builder(baseUri); if (sc.isSubscriptionStream()) { uriBuilder.path(PATH_SUBS).path(sc.subscriptionId()).path(PATH_EVENTS); uriBuilder = applySubscriptionQueryParamsTo(uriBuilder, sc); } else { uriBuilder.path(PATH_EVENT_TYPES).path(sc.eventTypeName()).path(PATH_EVENTS); uriBuilder = applyParamsTo(uriBuilder, sc); } return uriBuilder.buildString(); }   }
StreamResourceSupport { static String buildStreamUrl(URI baseUri, StreamConfiguration sc) { UriBuilder uriBuilder = UriBuilder.builder(baseUri); if (sc.isSubscriptionStream()) { uriBuilder.path(PATH_SUBS).path(sc.subscriptionId()).path(PATH_EVENTS); uriBuilder = applySubscriptionQueryParamsTo(uriBuilder, sc); } else { uriBuilder.path(PATH_EVENT_TYPES).path(sc.eventTypeName()).path(PATH_EVENTS); uriBuilder = applyParamsTo(uriBuilder, sc); } return uriBuilder.buildString(); }   static final String X_NAKADI_STREAM_ID; static final String SUBSCRIPTION_ID; }