Package net.sf.colossus.webserver
Class ChatChannel
java.lang.Object
net.sf.colossus.webserver.ChatChannel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
private final String
private final PrintWriter
private static final String[]
private static final String
private static final Logger
private static final String[]
private final ChatMsgStorage
private final UserDB
private final FormatWhen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
createStoreAndDeliverMessage
(String sender, String message) void
private void
deliverMessage
(ChatMessage msg, UserDB userDB) void
deliverMessageOfTheDayToClient
(String chatId, IWebClient client, List<String> lines) Send message of the day lines to one client.private void
deliverMessageToClient
(ChatMessage msg, IWebClient client, boolean isResent) void
deliverOldVersionWarning
(String chatId, String userName, IWebClient client) Send message of the day lines to one client.void
dispose()
void
handleShowInfo
(IWebClient client, User user) void
handleUnknownCommand
(String msgAllLower, String chatId, IWebClient client) private String
onlineTimeFromSeconds
(long totalsecs) private PrintWriter
openLogForAppend
(WebServerOptions options) void
sendHelpToClient
(String msgAllLower, String chatId, IWebClient client) void
sendLinesToClient
(String chatId, IWebClient client, List<String> lines, boolean spacer, String sender) Send an arraylist full of lines to one client.void
showContactHelp
(String chatId, IWebClient client) void
tellLastMessagesToOne
(IWebClient client)
-
Field Details
-
LOGGER
-
userDB
-
chatId
-
storage
-
chatLog
-
whenFormatter
-
doubledashes
- See Also:
-
chatHelp
-
pingHelp
-
contactHelp
-
-
Constructor Details
-
ChatChannel
-
-
Method Details
-
getChannelId
-
dispose
public void dispose() -
createWelcomeMessage
public void createWelcomeMessage() -
deliverMessageOfTheDayToClient
Send message of the day lines to one client. -
handleUnknownCommand
-
sendHelpToClient
-
showContactHelp
- Parameters:
chatId
- Id of the chatclient
- WebClient connection who requested the contact help
-
sendLinesToClient
public void sendLinesToClient(String chatId, IWebClient client, List<String> lines, boolean spacer, String sender) Send an arraylist full of lines to one client. -
handleShowInfo
-
onlineTimeFromSeconds
-
deliverOldVersionWarning
Send message of the day lines to one client. -
createStoreAndDeliverMessage
-
deliverMessage
-
deliverMessageToClient
-
tellLastMessagesToOne
-
openLogForAppend
-
appendToChatlog
-