deepstream.io-client-java icon indicating copy to clipboard operation
deepstream.io-client-java copied to clipboard

java client code does not work well

Open turbo-xp opened this issue 5 years ago • 2 comments

   @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 ....

turbo-xp avatar Jun 04 '20 03:06 turbo-xp

I'm sorry but there aren't any active maintainers on deepstream java anymore so it's unlikely you'll get a response.

yasserf avatar Jun 04 '20 05:06 yasserf

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.

turbo-xp avatar Jun 04 '20 05:06 turbo-xp