io.termd.core.pty.EventHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of termd-core Show documentation
Show all versions of termd-core Show documentation
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