public class StompChat extends java.lang.Object implements StompConnection.Listener
Modifier and Type | Field and Description |
---|---|
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 |
Constructor and Description |
---|
StompChat(java.lang.String host,
int port,
java.lang.String user) |
Modifier and Type | Method and Description |
---|---|
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 StompChat(java.lang.String host, int port, java.lang.String user)
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
in interface StompConnection.Listener
public void onMessage(java.util.Map<java.lang.String,java.lang.String> headers, byte[] buf, int offset, int length)
onMessage
in interface StompConnection.Listener
Copyright © 1998-2020 Red Hat. All Rights Reserved.