Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Coding Dojo
reactive-programming
Commits
8fed510a
Commit
8fed510a
authored
Aug 27, 2018
by
Paul BOUTES
Browse files
feat: add introduction with observable and side effects operator
parent
f7df5e2d
Changes
21
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/ippon/codingdojo/reactive/part2/Code6Solution.java
0 → 100644
View file @
8fed510a
package
com.ippon.codingdojo.reactive.part2
;
import
io.reactivex.Observable
;
public
class
Code6Solution
{
public
static
void
main
(
String
[]
args
)
{
final
Observable
<
String
>
observable
=
Observable
.
create
(
subscriber
->
{
subscriber
.
onNext
(
"Alice"
);
subscriber
.
onNext
(
"John"
);
subscriber
.
onError
(
new
RuntimeException
(
"BAZINGA"
));
subscriber
.
onComplete
();
});
observable
.
subscribe
(
System
.
out
::
println
,
e
->
System
.
out
.
println
(
"Ouuups : "
+
e
.
getMessage
()),
()
->
System
.
out
.
println
(
"onComplete()"
)
);
}
}
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment