Eclipse Platform
2.0

org.eclipse.debug.core.model
Interface IStreamMonitor


public interface IStreamMonitor

A stream monitor manages the contents of the stream a process is writing to, and notifies registered listeners of changes in the stream.

Clients may implement this interface. Generally, a client that provides an implementation of the IStreamsProxy interface must also provide an implementation of this interface.

See Also:
IStreamsProxy

Method Summary
 void addListener(IStreamListener listener)
          Adds the given listener to this stream monitor's registered listeners.
 String getContents()
          Returns the entire current contents of the stream.
 void removeListener(IStreamListener listener)
          Removes the given listener from this stream monitor's registered listeners.
 

Method Detail

addListener

public void addListener(IStreamListener listener)
Adds the given listener to this stream monitor's registered listeners. Has no effect if an identical listener is already registered.

Parameters:
listener - the listener to add

getContents

public String getContents()
Returns the entire current contents of the stream. An empty String is returned if the stream is empty.

Returns:
the stream contents as a String

removeListener

public void removeListener(IStreamListener listener)
Removes the given listener from this stream monitor's registered listeners. Has no effect if the listener is not already registered.

Parameters:
listener - the listener to remove

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.