From 6afce08ec8fc580b2e79fdb20107abc193cce359 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Tue, 17 Oct 2017 17:40:33 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi_netflix-rxjava-springmvc.html | 24 +++++++++++------------ single/spring-cloud-netflix.html | 24 +++++++++++------------ spring-cloud-netflix.xml | 24 +++++++++++------------ 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/multi/multi_netflix-rxjava-springmvc.html b/multi/multi_netflix-rxjava-springmvc.html index 5b1589dc0..4cf40f407 100644 --- a/multi/multi_netflix-rxjava-springmvc.html +++ b/multi/multi_netflix-rxjava-springmvc.html @@ -21,31 +21,31 @@ return Single.error(new RuntimeException("Unexpected")); }

If you have an Observable, rather than a single, you can use .toSingle() or .toList().toSingle(). Here are some examples:

@RequestMapping(method = RequestMethod.GET, value = "/single")
 public Single<String> single() {
-    return Observable.just("single value").toSingle();
+	return Observable.just("single value").toSingle();
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/multiple")
 public Single<List<String>> multiple() {
-    return Observable.just("multiple", "values").toList().toSingle();
+	return Observable.just("multiple", "values").toList().toSingle();
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/responseWithObservable")
 public ResponseEntity<Single<String>> responseWithObservable() {
 
-    Observable<String> observable = Observable.just("single value");
-    HttpHeaders headers = new HttpHeaders();
-    headers.setContentType(APPLICATION_JSON_UTF8);
-    return new ResponseEntity<>(observable.toSingle(), headers, HttpStatus.CREATED);
+	Observable<String> observable = Observable.just("single value");
+	HttpHeaders headers = new HttpHeaders();
+	headers.setContentType(APPLICATION_JSON_UTF8);
+	return new ResponseEntity<>(observable.toSingle(), headers, HttpStatus.CREATED);
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/timeout")
 public Observable<String> timeout() {
-    return Observable.timer(1, TimeUnit.MINUTES).map(new Func1<Long, String>() {
-        @Override
-        public String call(Long aLong) {
-            return "single value";
-        }
-    });
+	return Observable.timer(1, TimeUnit.MINUTES).map(new Func1<Long, String>() {
+		@Override
+		public String call(Long aLong) {
+			return "single value";
+		}
+	});
 }

If you have a streaming endpoint and client, SSE could be an option. To convert rx.Observable to a Spring SseEmitter use RxResponse.sse(). Here are some examples:

@RequestMapping(method = RequestMethod.GET, value = "/sse")
 public SseEmitter single() {
 	return RxResponse.sse(Observable.just("single value"));
diff --git a/single/spring-cloud-netflix.html b/single/spring-cloud-netflix.html
index d0c22dbdc..8513adf9b 100644
--- a/single/spring-cloud-netflix.html
+++ b/single/spring-cloud-netflix.html
@@ -1333,31 +1333,31 @@ might result in a YAML document like the following

return Single.error(new RuntimeException("Unexpected"));
 }

If you have an Observable, rather than a single, you can use .toSingle() or .toList().toSingle(). Here are some examples:

@RequestMapping(method = RequestMethod.GET, value = "/single")
 public Single<String> single() {
-    return Observable.just("single value").toSingle();
+	return Observable.just("single value").toSingle();
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/multiple")
 public Single<List<String>> multiple() {
-    return Observable.just("multiple", "values").toList().toSingle();
+	return Observable.just("multiple", "values").toList().toSingle();
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/responseWithObservable")
 public ResponseEntity<Single<String>> responseWithObservable() {
 
-    Observable<String> observable = Observable.just("single value");
-    HttpHeaders headers = new HttpHeaders();
-    headers.setContentType(APPLICATION_JSON_UTF8);
-    return new ResponseEntity<>(observable.toSingle(), headers, HttpStatus.CREATED);
+	Observable<String> observable = Observable.just("single value");
+	HttpHeaders headers = new HttpHeaders();
+	headers.setContentType(APPLICATION_JSON_UTF8);
+	return new ResponseEntity<>(observable.toSingle(), headers, HttpStatus.CREATED);
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/timeout")
 public Observable<String> timeout() {
-    return Observable.timer(1, TimeUnit.MINUTES).map(new Func1<Long, String>() {
-        @Override
-        public String call(Long aLong) {
-            return "single value";
-        }
-    });
+	return Observable.timer(1, TimeUnit.MINUTES).map(new Func1<Long, String>() {
+		@Override
+		public String call(Long aLong) {
+			return "single value";
+		}
+	});
 }

If you have a streaming endpoint and client, SSE could be an option. To convert rx.Observable to a Spring SseEmitter use RxResponse.sse(). Here are some examples:

@RequestMapping(method = RequestMethod.GET, value = "/sse")
 public SseEmitter single() {
 	return RxResponse.sse(Observable.just("single value"));
diff --git a/spring-cloud-netflix.xml b/spring-cloud-netflix.xml
index 54208d302..95d0d5084 100644
--- a/spring-cloud-netflix.xml
+++ b/spring-cloud-netflix.xml
@@ -2325,31 +2325,31 @@ public Single<Object> error() {
 If you have an Observable, rather than a single, you can use .toSingle() or .toList().toSingle(). Here are some examples:
 @RequestMapping(method = RequestMethod.GET, value = "/single")
 public Single<String> single() {
-    return Observable.just("single value").toSingle();
+	return Observable.just("single value").toSingle();
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/multiple")
 public Single<List<String>> multiple() {
-    return Observable.just("multiple", "values").toList().toSingle();
+	return Observable.just("multiple", "values").toList().toSingle();
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/responseWithObservable")
 public ResponseEntity<Single<String>> responseWithObservable() {
 
-    Observable<String> observable = Observable.just("single value");
-    HttpHeaders headers = new HttpHeaders();
-    headers.setContentType(APPLICATION_JSON_UTF8);
-    return new ResponseEntity<>(observable.toSingle(), headers, HttpStatus.CREATED);
+	Observable<String> observable = Observable.just("single value");
+	HttpHeaders headers = new HttpHeaders();
+	headers.setContentType(APPLICATION_JSON_UTF8);
+	return new ResponseEntity<>(observable.toSingle(), headers, HttpStatus.CREATED);
 }
 
 @RequestMapping(method = RequestMethod.GET, value = "/timeout")
 public Observable<String> timeout() {
-    return Observable.timer(1, TimeUnit.MINUTES).map(new Func1<Long, String>() {
-        @Override
-        public String call(Long aLong) {
-            return "single value";
-        }
-    });
+	return Observable.timer(1, TimeUnit.MINUTES).map(new Func1<Long, String>() {
+		@Override
+		public String call(Long aLong) {
+			return "single value";
+		}
+	});
 }
 If you have a streaming endpoint and client, SSE could be an option. To convert rx.Observable to a Spring SseEmitter use RxResponse.sse(). Here are some examples:
 @RequestMapping(method = RequestMethod.GET, value = "/sse")