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 15 /** 16 * A stream monitor who's contents can be flushed. As well, a client may 17 * turn buffering on/off in a flushable stream monitor. 18 * <p> 19 * Clients may implement this interface. 20 * </p> 21 * @since 2.1 22 */ 23 public interface IFlushableStreamMonitor extends IStreamMonitor { 24 25 /** 26 * Empties the contents of this stream monitor's underlying buffer. 27 */ 28 public void flushContents(); 29 30 /** 31 * Sets whether the contents of this monitor's underlying stream should be 32 * buffered. When <code>false</code>, contents appended to this stream monitor 33 * are not stored in a buffer, and are thus not available from 34 * <code>getContents()</code>. Registered listeners are notified of appended 35 * text, and must buffer the contents if desired. 36 * 37 * @param buffer whether the contents of this monitor's underlying stream 38 * should be buffered 39 */ 40 public void setBuffered(boolean buffer); 41 42 /** 43 * Returns whether the contents of this monitor's underlying stream is 44 * buffered. 45 * 46 * @return whether the contents of this monitor's underlying stream is 47 * buffered 48 */ 49 public boolean isBuffered(); 50 } 51