net.sf.colossus.webserver
Class ChatMsgStorage
java.lang.Object
net.sf.colossus.webserver.ChatMsgStorage
public class ChatMsgStorage
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
private static final java.util.logging.Logger LOGGER
options
private final WebServerOptions options
channel
private final ChatChannel channel
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
ChatMsgStorage
public ChatMsgStorage(ChatChannel theChannel,
WebServerOptions options)
dispose
public void dispose()
getChannel
public ChatChannel getChannel()
getLastNChatMessages
public java.util.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 java.lang.String makeLine(ChatMessage msg)
parseMsgLine
private void parseMsgLine(java.lang.String line)