try {
JsonObject authData = new JsonObject();
authData.addProperty( "username", "Wolfram" );
DeepstreamClient ds = new DeepstreamClient( "localhost:6021" );
ds
<BUG>.addConnectionChangeListener( this )
.setRuntimeErrorHandler(new DeepstreamRuntimeErrorHandler() {</BUG>
@Override
public void onException(Topic topic, Event event, String msg) {
System.out.println( "Error occured " + topic + " " + event + " " + msg );

try {
JsonObject authData = new JsonObject();
authData.addProperty( "username", "Wolfram" );
DeepstreamClient ds = new DeepstreamClient( "localhost:6021" );
ds
.addConnectionChangeListener( this )
.login( authData, this )
.setRuntimeErrorHandler(new DeepstreamRuntimeErrorHandler() {
@Override
public void onException(Topic topic, Event event, String msg) {
System.out.println( "Error occured " + topic + " " + event + " " + msg );
