You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,59 @@ The generic parameter of `Decoder.TextStream<T>` designates which The type param
68
68
return new SAXDecoder<ZoneList>(handlers){};
69
69
}
70
70
```
71
+
### Asynchronous Incremental Callbacks
72
+
If specified as the last argument of a method `IncrementalCallback<T>` fires a background task to add new elements to the callback as they are decoded. Think of `IncrementalCallback<T>` as an asynchronous equivalent to a lazy sequence.
When using an `IncrementalCallback<T>`, you'll need to configure an `IncrementalDecoderi.TextStream<T>` or a general one for all types (`IncrementalDecoder.TextStream<Object>`).
96
+
97
+
Here's how to wire in a reflective incremental json decoder:
if (e.getCause() !=null&& e.getCause() instanceofIOException) {
111
+
throwIOException.class.cast(e.getCause());
112
+
}
113
+
throw e;
114
+
}
115
+
}
116
+
jsonReader.endArray();
117
+
}
118
+
};
119
+
}
120
+
```
121
+
122
+
123
+
71
124
### Multiple Interfaces
72
125
Feign can produce multiple api interfaces. These are defined as `Target<T>` (default `HardCodedTarget<T>`), which allow for dynamic discovery and decoration of requests prior to execution.
0 commit comments