Biblioteca Java - Rev 31

Subversion Repositories:
Rev:
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;
    }
}