All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.paritytrading.philadelphia.client.command.ExitCommand Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
package com.paritytrading.philadelphia.client.command;

import com.paritytrading.philadelphia.client.TerminalClient;
import java.util.Scanner;

class ExitCommand implements Command {

    @Override
    public void execute(TerminalClient client, Scanner arguments) throws CommandException {
        if (arguments.hasNext())
            throw new CommandException();

        client.close();
    }

    @Override
    public String getName() {
        return "exit";
    }

    @Override
    public String getDescription() {
        return "Exit the client";
    }

    @Override
    public String getUsage() {
        return "exit";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy