public class StompChat extends Object implements StompConnection.Listener
Modifier and Type | Field and Description |
---|---|
static String |
CLIENT |
static String |
CLIENT_JOINED |
static String |
CLIENT_LEFT |
static String |
CLIENTS |
static String |
CLIENTS_KW |
static String |
DESTINATION |
static String |
ENDPOINTS |
static String |
GET_USERS |
static String |
MESSAGES |
protected StompConnection |
stomp_client |
static String |
USER |
static String |
USER_JOINED |
static String |
USER_LEFT |
protected String |
username |
protected Set<String> |
users |
static String |
USERS |
static String |
USERS_KW |
static String |
VIEW |
Constructor and Description |
---|
StompChat(String host,
int port,
String user) |
Modifier and Type | Method and Description |
---|---|
protected void |
connect() |
static void |
main(String[] args) |
void |
onInfo(Map<String,String> information) |
void |
onMessage(Map<String,String> headers,
byte[] buf,
int offset,
int length) |
protected void |
send(String msg) |
void |
sendGetUsers() |
protected void |
showStatus(String msg) |
void |
start() |
protected String username
protected StompConnection stomp_client
public static final String MESSAGES
public static final String CLIENT_JOINED
public static final String CLIENT_LEFT
public static final String CLIENTS
public static final String USER_JOINED
public static final String USER_LEFT
public static final String GET_USERS
public static final String USERS
public static final String ENDPOINTS
public static final String VIEW
public static final String CLIENTS_KW
public static final String DESTINATION
public static final String USER
public static final String USERS_KW
public static final String CLIENT
protected void send(String msg)
public void sendGetUsers()
protected void showStatus(String msg)
public void onInfo(Map<String,String> information)
onInfo
in interface StompConnection.Listener
public void onMessage(Map<String,String> headers, byte[] buf, int offset, int length)
onMessage
in interface StompConnection.Listener
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.