deepstreamIO / deepstream.io-client-java

The Java/Android Client for deepstream.io
Other
35 stars 37 forks source link

java client code does not work well #146

Open turbo-xp opened 4 years ago

turbo-xp commented 4 years ago
   @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 commented 4 years ago

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 commented 4 years ago

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.