Search in sources :

Example 1 with Action

use of games.strategy.net.nio.QuarantineConversation.Action in project triplea by triplea-game.

the class Decoder method sendQuarantine.

private void sendQuarantine(final SocketChannel channel, final QuarantineConversation conversation, final MessageHeader header) {
    final Action a = conversation.message(header.getMessage());
    if (a == Action.TERMINATE) {
        conversation.close();
        // we need to indicate the channel was closed
        errorReporter.error(channel, new CouldNotLogInException());
    } else if (a == Action.UNQUARANTINE) {
        nioSocket.unquarantine(channel, conversation);
        quarantine.remove(channel);
    }
}
Also used : Action(games.strategy.net.nio.QuarantineConversation.Action) CouldNotLogInException(games.strategy.net.CouldNotLogInException)

Aggregations

CouldNotLogInException (games.strategy.net.CouldNotLogInException)1 Action (games.strategy.net.nio.QuarantineConversation.Action)1