WebsocketConstants.java
909 Bytes
package com.huaheng.framework.websocket;
public class WebsocketConstants {
//公共话题代理名称
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";
}