public class StompChat extends java.lang.Object implements StompConnection.Listener
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
CLIENT |
static java.lang.String |
CLIENT_JOINED |
static java.lang.String |
CLIENT_LEFT |
static java.lang.String |
CLIENTS |
static java.lang.String |
CLIENTS_KW |
static java.lang.String |
DESTINATION |
static java.lang.String |
ENDPOINTS |
static java.lang.String |
GET_USERS |
static java.lang.String |
MESSAGES |
protected StompConnection |
stomp_client |
static java.lang.String |
USER |
static java.lang.String |
USER_JOINED |
static java.lang.String |
USER_LEFT |
protected java.lang.String |
username |
protected java.util.Set<java.lang.String> |
users |
static java.lang.String |
USERS |
static java.lang.String |
USERS_KW |
static java.lang.String |
VIEW |
构造器和说明 |
---|
StompChat(java.lang.String host,
int port,
java.lang.String user) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
connect() |
static void |
main(java.lang.String[] args) |
void |
onInfo(java.util.Map<java.lang.String,java.lang.String> information) |
void |
onMessage(java.util.Map<java.lang.String,java.lang.String> headers,
byte[] buf,
int offset,
int length) |
protected void |
send(java.lang.String msg) |
void |
sendGetUsers() |
protected void |
showStatus(java.lang.String msg) |
void |
start() |
protected java.lang.String username
protected final java.util.Set<java.lang.String> users
protected StompConnection stomp_client
public static final java.lang.String MESSAGES
public static final java.lang.String CLIENT_JOINED
public static final java.lang.String CLIENT_LEFT
public static final java.lang.String CLIENTS
public static final java.lang.String USER_JOINED
public static final java.lang.String USER_LEFT
public static final java.lang.String GET_USERS
public static final java.lang.String USERS
public static final java.lang.String ENDPOINTS
public static final java.lang.String VIEW
public static final java.lang.String CLIENTS_KW
public static final java.lang.String DESTINATION
public static final java.lang.String USER
public static final java.lang.String USERS_KW
public static final java.lang.String CLIENT
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void start() throws java.lang.Exception
java.lang.Exception
protected void connect() throws java.lang.Exception
java.lang.Exception
protected void send(java.lang.String msg)
public void sendGetUsers()
protected void showStatus(java.lang.String msg)
public void onInfo(java.util.Map<java.lang.String,java.lang.String> information)
onInfo
在接口中 StompConnection.Listener
public void onMessage(java.util.Map<java.lang.String,java.lang.String> headers, byte[] buf, int offset, int length)
onMessage
在接口中 StompConnection.Listener