src/main/java/org/gm4java/im4java/GMBatchCommand.java
@Override
    protected int run(@Nonnull LinkedList<String> pArgs) throws Exception {

        int rc;
        try {
            String result = executor.execute(pArgs);
            if (outputConsumer != null && result != null) outputConsumer.consumeOutput(stringToStream(result));
            rc = 0;
        } catch (GMException e) {
            if (errorConsumer != null) errorConsumer.consumeError(stringToStream(e.getMessage()));
            else throw e;
            rc = 1;
        }
        finished(rc);
        return rc;
    }
@Override
    protected int run(@Nonnull LinkedList<String> pArgs) throws Exception {

        int rc;
        try {
            String result = executor.execute(pArgs);
            if (outputConsumer != null && result != null) outputConsumer.consumeOutput(stringToStream(result));
            rc = 0;
        } catch (GMException e) {
            if (errorConsumer != null) errorConsumer.consumeError(stringToStream(e.getMessage()));
            else throw e;
            rc = 1;
        }
        finished(rc);
        return rc;
    }
@ Override protected int run ( @ Nonnull LinkedList < String > pArgs ) throws Exception { int rc ; try { String result = executor . execute ( pArgs ) ; if ( outputConsumer != null && result != null ) outputConsumer . consumeOutput ( stringToStream ( result ) ) ; rc = 0 ; } catch ( GMException e ) { if ( errorConsumer != null ) errorConsumer . consumeError ( stringToStream ( e . getMessage ( ) ) ) ; else throw e ; rc = 1 ; } finished ( rc ) ; return rc ; }
{@inheritDoc}

This implementation uses {@link GMExecutor} to execute the command.
{ @inheritDoc }