/** * Sends a message over the network, asking the other clients to identify * themselves. */ public void sendExposeMessage() { networkMessages.sendExposeMessage(); }
/** * Sends a message over the network, asking the other clients to identify * themselves. */ public void sendExposeMessage() { networkMessages.sendExposeMessage(); }
/** * If any users have timed out because of missed idle messages, then * send a message over the network to ask all clients to identify * themselves again. */ public void updateAfterTimeout() { if (userListController.isTimeoutUsers()) { networkMessages.sendExposeMessage(); } }
/** * If any users have timed out because of missed idle messages, then * send a message over the network to ask all clients to identify * themselves again. */ public void updateAfterTimeout() { if (userListController.isTimeoutUsers()) { networkMessages.sendExposeMessage(); } }
/** * Sends the necessary network messages to log the user onto the network * and query for the users and state. */ private void sendLogOn() { networkMessages.sendLogonMessage(); networkMessages.sendClient(); networkMessages.sendExposeMessage(); networkMessages.sendGetTopicMessage(); }
/** * Sends the necessary network messages to log the user onto the network * and query for the users and state. */ private void sendLogOn() { networkMessages.sendLogonMessage(); networkMessages.sendClient(); networkMessages.sendExposeMessage(); networkMessages.sendGetTopicMessage(); }
/** * Tests sendExposeMessage(). * * Expects: 16424378!EXPOSE#Christian: */ @Test public void testSendExposeMessage() { messages.sendExposeMessage(); verify(service).sendMessageToAllUsers(createMessage("EXPOSE")); }
@Test public void networkCameUpShouldSendMessagesToDiscoverChatStateIfLoggedOn() { doReturn(true).when(controller).isLoggedOn(); controller.networkCameUp(true); final InOrder inOrder = inOrder(networkMessages); inOrder.verify(networkMessages).sendTopicRequestedMessage(controller.getTopic()); inOrder.verify(networkMessages).sendExposingMessage(); inOrder.verify(networkMessages).sendGetTopicMessage(); inOrder.verify(networkMessages).sendExposeMessage(); inOrder.verify(networkMessages).sendIdleMessage(); }
@Test public void networkCameUpShouldSendLogOnMessagesIfNotLoggedOn() { assertFalse(controller.isLoggedOn()); controller.networkCameUp(true); final InOrder inOrder = inOrder(networkMessages); inOrder.verify(networkMessages).sendLogonMessage(); inOrder.verify(networkMessages).sendClient(); inOrder.verify(networkMessages).sendExposeMessage(); inOrder.verify(networkMessages).sendGetTopicMessage(); }
/** * Makes sure the application reacts when the network is available. * * @param silent If true, wont show the "you are connected..." message to the user. */ @Override public void networkCameUp(final boolean silent) { // Network came up after a logon if (!isLoggedOn()) { runDelayedLogon(); sendLogOn(); } // Network came up after a timeout else { ui.showTopic(); if (!silent) { msgController.showSystemMessage(coreMessages.getMessage("core.network.systemMessage.connectionBack")); } networkMessages.sendTopicRequestedMessage(getTopic()); networkMessages.sendExposingMessage(); networkMessages.sendGetTopicMessage(); networkMessages.sendExposeMessage(); networkMessages.sendIdleMessage(); } }
/** * Makes sure the application reacts when the network is available. * * @param silent If true, wont show the "you are connected..." message to the user. */ @Override public void networkCameUp(final boolean silent) { // Network came up after a logon if (!isLoggedOn()) { runDelayedLogon(); sendLogOn(); } // Network came up after a timeout else { ui.showTopic(); if (!silent) { msgController.showSystemMessage(coreMessages.getMessage("core.network.systemMessage.connectionBack")); } networkMessages.sendTopicRequestedMessage(getTopic()); networkMessages.sendExposingMessage(); networkMessages.sendGetTopicMessage(); networkMessages.sendExposeMessage(); networkMessages.sendIdleMessage(); } }