Blame view

src/main/java/com/huaheng/pc/stompwebsocket/WebsocketConstants.java 1.08 KB
1
package com.huaheng.pc.stompwebsocket;
2
3

public class WebsocketConstants {
4
    //{服务端最小心跳间隔,期望客户端的心跳间隔}
周峰 authored
5
    public final static long[] HEART_BEAT = new long[]{1000000, 50000};
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    //公共话题代理名称
    public final static String BROKER_TOPIC = "/topic";

    //点对点消息代理名称
    public final static String BROKER_QUEUE = "/queue";

    //点对点消息的用户前缀,终端订阅时要加上该前缀
    public final static String USER_PRIFIX = "/user";

    //终端通过websocket上行的MessageMapping前缀
    public final static String APP_PRIFIX = "/app";

    //建立websocket握手的http地址
    public final static String ENDPOINT = "/endpoint";

    //定义一个message类型的公共话题: /topic/message
    //终端订阅公共话题的路径:
    public final static String TOPIC_MESSAGE = BROKER_TOPIC + "/message";

    //定义一个message类型的点对点话题(暂时无用)
    public final static String QUEUE_MESSAGE = BROKER_QUEUE + "/message";
28
29

    public final static String HEADER_MEG_ID = "msg-id";
30
}