Skip to content

Instantly share code, notes, and snippets.

@push-gists

push-gists/AddMapStream.java Secret

Last active Aug 2, 2016
Embed
What would you like to do?
Add a stream of maps
session
.feature(Topics.class)
.addStream(
"json/data",
JSON.class,
new MapStreamAdapter(new MapStream() {
@Override
public void onTransformationException(String topicPath, JSON value, Exception e) {
// Handle errors
}
@Override
public void onValue(
String topicPath,
TopicSpecification topicSpecification,
Map<String, Object> oldValue,
Map<String, Object> newValue) {
// Do something awesome
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment