All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pdd.pop.sdk.message.demo.MessageDemo Maven / Gradle / Ivy

package com.pdd.pop.sdk.message.demo;

import com.pdd.pop.sdk.message.MessageHandler;
import com.pdd.pop.sdk.message.WsClient;
import com.pdd.pop.sdk.message.model.Message;

public class MessageDemo {

    static String clientId = "your app clientId";
    static String clientSecret = "your app clientSecret";

    public static void main(String[] args) {
        WsClient ws = new WsClient(clientId, clientSecret, new MessageHandler() {
            public void onMessage(Message message) throws InterruptedException {
                System.out.println("receive message: " + message);
            }
        });
        ws.connect();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy