protected void runCommand( HostedConnection conn, String user, String command ) {
        if( "/shutdown".equals(command) ) {
            server.broadcast(new ChatMessage("server", "Server is shutting down."));
            close();
        } else if( "/help".equals(command) ) {
            StringBuilder sb = new StringBuilder();
            sb.append("Chat commands:\n");
            sb.append("/help - prints this message.\n");
            sb.append("/shutdown - shuts down the server.");
            server.broadcast(new ChatMessage("server", sb.toString()));   
        }
    }
A simple test chat server.  When SM implements a set
 of standard chat classes this can become a lot simpler.

 @version   $Revision$
 @author    Paul Speed
jme3-examples/src/main/java/jme3test/network/TestChatServer.java