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

org.kohsuke.ajaxterm.ProcessWithPty Maven / Gradle / Ivy

The newest version!
package org.kohsuke.ajaxterm;

import java.io.IOException;

/**
 * {@link Process} with additional controls for pseudo-terminal.
 *
 * @author Kohsuke Kawaguchi
 */
public abstract class ProcessWithPty extends Process {
    protected ProcessWithPty() {
    }

    public abstract void setWindowSize(int width, int height) throws IOException;

    public abstract void kill(int signal) throws IOException;

    /**
     * Is this process still alive?
     */
    public boolean isAlive() {
        try {
            exitValue();
            return true;
        } catch (IllegalThreadStateException e) {
            return false;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy