Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.scattersphere.client.handler;
 
 
Created by kenji on 1/11/15.
 
    public StatusCommandHandler(PrintWriter outClient client) {
        super(outclient);
    }
    @Override
    public void handle(String[] args) {
        if (getClient().getClientConnection("Main").isConnected()) {
            if (args.length > 1) {
                getClient().statusJob("Main"args[1]);
            } else {
                getPrintWriter().println("Status: requires a job ID argument.");
            }
        } else {
            getPrintWriter().println("Not connected.\n");
        }
    }
    @Override
    public boolean canHandle(String[] args) {
        return args != null && args.length > 0 && args[0].equalsIgnoreCase("status");
    }
New to GrepCode? Check out our FAQ X