com.aptana.ide.debug.internal.core.model
Class OutputStreamMonitor

java.lang.Object
  extended by com.aptana.ide.debug.internal.core.model.OutputStreamMonitor
All Implemented Interfaces:
org.eclipse.debug.core.model.IFlushableStreamMonitor, org.eclipse.debug.core.model.IStreamMonitor

public class OutputStreamMonitor
extends java.lang.Object
implements org.eclipse.debug.core.model.IFlushableStreamMonitor

Monitors the output stream of a system process and notifies listeners of additions to the stream. The output stream monitor reads system out (or err) via and input stream.


Constructor Summary
OutputStreamMonitor(java.io.InputStream stream)
          Creates an output stream monitor on the given stream (connected to system out or err).
 
Method Summary
 void addListener(org.eclipse.debug.core.IStreamListener listener)
           
protected  void close()
          Causes the monitor to close all communications between it and the underlying stream by waiting for the thread to terminate.
 void flushContents()
           
 java.lang.String getContents()
           
 boolean isBuffered()
           
protected  void kill()
           
 void removeListener(org.eclipse.debug.core.IStreamListener listener)
           
 void setBuffered(boolean buffer)
           
 void startMonitoring()
          Starts a thread which reads from the stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputStreamMonitor

public OutputStreamMonitor(java.io.InputStream stream)
Creates an output stream monitor on the given stream (connected to system out or err).

Method Detail

addListener

public void addListener(org.eclipse.debug.core.IStreamListener listener)
Specified by:
addListener in interface org.eclipse.debug.core.model.IStreamMonitor

close

protected void close()
Causes the monitor to close all communications between it and the underlying stream by waiting for the thread to terminate.


getContents

public java.lang.String getContents()
Specified by:
getContents in interface org.eclipse.debug.core.model.IStreamMonitor

kill

protected void kill()

removeListener

public void removeListener(org.eclipse.debug.core.IStreamListener listener)
Specified by:
removeListener in interface org.eclipse.debug.core.model.IStreamMonitor

startMonitoring

public void startMonitoring()
Starts a thread which reads from the stream


setBuffered

public void setBuffered(boolean buffer)
Specified by:
setBuffered in interface org.eclipse.debug.core.model.IFlushableStreamMonitor
See Also:
IFlushableStreamMonitor.setBuffered(boolean)

flushContents

public void flushContents()
Specified by:
flushContents in interface org.eclipse.debug.core.model.IFlushableStreamMonitor
See Also:
IFlushableStreamMonitor.flushContents()

isBuffered

public boolean isBuffered()
Specified by:
isBuffered in interface org.eclipse.debug.core.model.IFlushableStreamMonitor
See Also:
IFlushableStreamMonitor.isBuffered()