Class ChatMsgStorage

java.lang.Object
net.sf.colossus.webserver.ChatMsgStorage

public class ChatMsgStorage extends Object
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • options

      private final WebServerOptions options
    • channel

      private final ChatChannel channel
    • lastNChatMessages

      private final List<ChatMessage> lastNChatMessages
    • SEP

      private static final 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:
  • Constructor Details

  • Method Details

    • dispose

      public void dispose()
    • getChannel

      public ChatChannel getChannel()
    • getLastNChatMessages

      public List<ChatMessage> getLastNChatMessages()
    • storeMessage

      void storeMessage(ChatMessage msg)
    • 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 String makeLine(ChatMessage msg)
    • parseMsgLine

      private void parseMsgLine(String line)