net.sf.mmm.util.process.api.AsyncProcessExecutor Maven / Gradle / Ivy
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.util.process.api;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/**
* This is the interface for an async executor of a {@link Process}.
*
* @author Joerg Hohwiller (hohwille at users.sourceforge.net)
* @since 1.0.0
*/
public interface AsyncProcessExecutor extends Future {
/**
* {@inheritDoc}
*
* @return the {@link Process#waitFor() exit-code} of the process.
*/
@Override
Integer get() throws InterruptedException, ExecutionException;
/**
* {@inheritDoc}
*
* @return the {@link Process#waitFor() exit-code} of the process.
*/
@Override
Integer get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy