public ExecWebSocketListener(Config config, InputStream in, OutputStream out, OutputStream err, OutputStream errChannel, PipedOutputStream inputPipe, PipedInputStream outputPipe, PipedInputStream errorPipe, PipedInputStream errorChannelPipe, ExecListener listener) {
this.config = config;
this.listener = listener;
this.in = inputStreamOrPipe(in, inputPipe, toClose);
this.out = outputStreamOrPipe(out, outputPipe, toClose);
this.err = outputStreamOrPipe(err, errorPipe, toClose);
this.errChannel = outputStreamOrPipe(errChannel, errorChannelPipe, toClose);
this.input = inputPipe;
this.output = outputPipe;
this.error = errorPipe;
this.errorChannel = errorChannelPipe;
this.pumper = new NonBlockingInputStreamPumper(this.in, new Callback<byte[]>() {
@Override
public void call(byte[] data) {
try {
send(data);
} catch (Exception e) {
}
}
});
}