code: @Message(encoders = {JacksonEncoder.class}, decoders = {ProtocolDecoder.class})
      public ChatProtocol onMessage(ChatProtocol message) throws IOException {
  
          if (!users.containsKey(message.getAuthor())) {
              users.put(message.getAuthor(), message.getUuid());
              return new ChatProtocol(message.getAuthor(), " entered room " + chatroomName, users.keySet(), getRooms(factory.lookupAll()));
          }
  
          if (message.getMessage().contains("disconnecting")) {
              users.remove(message.getAuthor());
              return new ChatProtocol(message.getAuthor(), " disconnected from room " + chatroomName, users.keySet(), getRooms(factory.lookupAll()));
          }
  
          message.setUsers(users.keySet());
          logger.info("{} just send {}", message.getAuthor(), message.getMessage());
          return new ChatProtocol(message.getAuthor(), message.getMessage(), users.keySet(), getRooms(factory.lookupAll()));
      }
docs: Simple annotated class that demonstrate how {@link org.atmosphere.config.managed.Encoder} and {@link org.atmosphere.config.managed.Decoder
  can be used.
  
  @param message an instance of {@link ChatProtocol }
  @return
  @throws IOException