org.sonatype.gshell.util.io
Class InputPipe

java.lang.Object
  extended by java.lang.Thread
      extended by org.sonatype.gshell.util.io.InputPipe
All Implemented Interfaces:
Closeable, Runnable

public class InputPipe
extends Thread
implements Closeable

An input pipe which can be interrupted.

Since:
2.0
Author:
Jason Dillon

Nested Class Summary
static interface InputPipe.InterruptHandler
           
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InputPipe(StreamSet streams, jline.Terminal terminal, InputPipe.InterruptHandler interruptHandler)
           
 
Method Summary
 void close()
           
 InputStream getInputStream()
           
 void run()
           
 void start()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputPipe

public InputPipe(StreamSet streams,
                 jline.Terminal terminal,
                 InputPipe.InterruptHandler interruptHandler)
Method Detail

close

public void close()
Specified by:
close in interface Closeable

start

public void start()
Overrides:
start in class Thread

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getInputStream

public InputStream getInputStream()


Copyright © 2008-2011 Sonatype. All Rights Reserved.