1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.debug.core.model; 12 13 14 import java.io.IOException; 15 16 /** 17 * A streams proxy acts as proxy between the streams of a 18 * process and interested clients. This abstraction allows 19 * implementations of <code>IProcess</code> to handle I/O related 20 * to the standard input, output, and error streams associated 21 * with a process. 22 * <p> 23 * Clients implementing the <code>IProcess</code> interface must also 24 * provide an implementation of this interface. 25 * </p> 26 * @see IProcess 27 */ 28 public interface IStreamsProxy { 29 /** 30 * Returns a monitor for the error stream of this proxy's process, 31 * or <code>null</code> if not supported. 32 * The monitor is connected to the error stream of the 33 * associated process. 34 * 35 * @return an error stream monitor, or <code>null</code> if none 36 */ 37 public IStreamMonitor getErrorStreamMonitor(); 38 /** 39 * Returns a monitor for the output stream of this proxy's process, 40 * or <code>null</code> if not supported. 41 * The monitor is connected to the output stream of the 42 * associated process. 43 * 44 * @return an output stream monitor, or <code>null</code> if none 45 */ 46 public IStreamMonitor getOutputStreamMonitor(); 47 /** 48 * Writes the given text to the output stream connected to the 49 * standard input stream of this proxy's process. 50 * 51 * @param input the text to be written 52 * @exception IOException when an error occurs writing to the 53 * underlying <code>OutputStream</code>. 54 * 55 */ 56 public void write(String input) throws IOException; 57 } 58