Class ChatMsgStorage


  • public class ChatMsgStorage
    extends java.lang.Object
    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • lastNChatMessages

        private final java.util.List<ChatMessage> lastNChatMessages
      • SEP

        private static final java.lang.String SEP
        Just by coincidence, we use the same separator as for the network transmissions, so then there is no risk of "can't be unambiguely encoded".
        See Also:
        Constant Field Values
    • Method Detail

      • dispose

        public void dispose()
      • getLastNChatMessages

        public java.util.List<ChatMessage> getLastNChatMessages()
      • storeMessages

        private void storeMessages()
        Store all messages to a permanent storage (Disk file or DB) from where they can be read back when server is restarting
      • restoreMessages

        private void restoreMessages()
      • makeLine

        public java.lang.String makeLine​(ChatMessage msg)
      • parseMsgLine

        private void parseMsgLine​(java.lang.String line)