Package org.jgroups.demos
Class StompChat
java.lang.Object
org.jgroups.demos.StompChat
- All Implemented Interfaces:
StompConnection.Listener
Chat client using STOMP to talk to other clients
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) JButtonstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String(package private) final JLabel(package private) final JLabelstatic final Stringstatic final Stringstatic final String(package private) JButton(package private) JFramestatic final Stringprivate intprivate int(package private) JButton(package private) final JLabelprotected StompConnection(package private) TextArea(package private) JTextFieldstatic final Stringstatic final Stringstatic final Stringprotected Stringstatic final Stringstatic final String(package private) final JLabelstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconnect()(package private) String(package private) int(package private) static voidhelp()static void(package private) voidvoidvoidprotected voidvoid(package private) voidsetTitle()(package private) voidshowMessage(String msg) protected voidshowStatus(String msg) voidstart()(package private) voiduserJoined(String name) (package private) void(package private) voidusersReceived(Collection<String> users) private String
-
Field Details
-
mainFrame
JFrame mainFrame -
txtArea
TextArea txtArea -
txtField
JTextField txtField -
csLabel
-
status
-
leaveButton
JButton leaveButton -
sendButton
JButton sendButton -
clearButton
JButton clearButton -
cluster
-
users_label
-
num_servers
private int num_servers -
num_clients
private int num_clients -
username
-
users
-
servers
-
clients
-
stomp_client
-
MESSAGES
- See Also:
-
CLIENT_JOINED
- See Also:
-
CLIENT_LEFT
- See Also:
-
CLIENTS
- See Also:
-
USER_JOINED
- See Also:
-
USER_LEFT
- See Also:
-
GET_USERS
- See Also:
-
USERS
- See Also:
-
ENDPOINTS
- See Also:
-
VIEW
- See Also:
-
CLIENTS_KW
- See Also:
-
DESTINATION
- See Also:
-
USER
- See Also:
-
USERS_KW
- See Also:
-
CLIENT
- See Also:
-
-
Constructor Details
-
StompChat
-
-
Method Details
-
main
- Throws:
Exception
-
showMessage
-
userJoined
-
userLeft
-
newView
-
usersReceived
-
help
static void help() -
start
- Throws:
Exception
-
connect
- Throws:
Exception
-
send
-
sendGetUsers
public void sendGetUsers() -
showStatus
-
onInfo
- Specified by:
onInfoin interfaceStompConnection.Listener
-
onMessage
- Specified by:
onMessagein interfaceStompConnection.Listener
-
usersToStr
-
setTitle
void setTitle() -
getNumberOfClients
int getNumberOfClients() -
getAllClients
String getAllClients()
-