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

io.termd.core.pty.EventHandler Maven / Gradle / Ivy

Go to download

An open source terminal daemon library providing terminal handling in Java, back ported to Alibaba by core engine team to support running on JDK 6+.

The newest version!
package io.termd.core.pty;

import io.termd.core.function.BiConsumer;
import io.termd.core.tty.TtyEvent;

/**
 * @author bw on 25/10/2016.
 */
public class EventHandler implements BiConsumer {
    private PtyMaster task;

    public EventHandler(PtyMaster task) {
        this.task = task;
    }

    @Override
    public void accept(TtyEvent event, Integer integer) {
        if (event == TtyEvent.INTR) {
            task.interruptProcess();
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy