Biblioteca Java - Rev 31
Subversion Repositories:
(root)/Frameworks and Technologies/TestActiveMQ2/src/main/java/test/clientserver/MessageProtocol.java @ 39
package test.clientserver;
public class MessageProtocol {
static long id;
public String handleProtocolMessage(String messageText) {
String responseText;
id++;
System.out.println("::: Processing message "+id);
if ("MyProtocolMessage".equalsIgnoreCase(messageText)) {
responseText = "I recognize your protocol message "+id;
} else {
responseText = "Unknown protocol message: " + messageText;
}
return responseText;
}
}
public class MessageProtocol {
static long id;
public String handleProtocolMessage(String messageText) {
String responseText;
id++;
System.out.println("::: Processing message "+id);
if ("MyProtocolMessage".equalsIgnoreCase(messageText)) {
responseText = "I recognize your protocol message "+id;
} else {
responseText = "Unknown protocol message: " + messageText;
}
return responseText;
}
}