deepstream.io-client-java
deepstream.io-client-java copied to clipboard
java client code does not work well
@PostConstruct
public void init() {
System.out.println("----------------------");
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1);
scheduledThreadPoolExecutor.execute(new Runnable() {
@Override
public void run() {
try {
startUp();
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
});
System.out.println("----------------------");
}
private void startUp() throws URISyntaxException {
DeepstreamClient client = new DeepstreamClient("localhost:6020");
client.addConnectionChangeListener(new ConnectionStateListener() {
@Override
public void connectionStateChanged(ConnectionState arg0) {
System.out.println(arg0.name());
}
});
client.setRuntimeErrorHandler(new DeepstreamRuntimeErrorHandler() {
@Override
public void onException(Topic arg0, Event arg1, String arg2) {
System.out.println(arg2);
}
});
LoginResult result = client.login(null);
if (result.loggedIn()) {
System.out.println("loggedIn");
}
}
and the console log is
RECONNECTING AWAITING_CONNECTION RECONNECTING AWAITING_CONNECTION RECONNECTING AWAITING_CONNECTION
do i has the uncorrect code ?? waiting for your reply online ....
I'm sorry but there aren't any active maintainers on deepstream java anymore so it's unlikely you'll get a response.
I'm sorry but there aren't any active maintainers on deepstream java anymore so it's unlikely you'll get a response.
Doesn't one of these versions work on deepstream java ? it's a pity.