Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

java client code does not work well #146

Open
turbo-xp opened this issue Jun 4, 2020 · 2 comments
Open

java client code does not work well #146

turbo-xp opened this issue Jun 4, 2020 · 2 comments

Comments

@turbo-xp
Copy link

turbo-xp commented Jun 4, 2020

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

@yasserf
Copy link
Contributor

yasserf commented Jun 4, 2020

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

@turbo-xp
Copy link
Author

turbo-xp commented Jun 4, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants