Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d85db0fbd84e21a06ed838ab73cc7bde2f57f604 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.debug.core.model;



/**
 * A stream monitor who's contents can be flushed. As well, a client may
 * turn buffering on/off in a flushable stream monitor.
 * <p>
 * Clients may implement this interface.
 * </p>
 * @since 2.1
 */
public interface IFlushableStreamMonitor extends IStreamMonitor {

	/**
	 * Empties the contents of this stream monitor's underlying buffer.
	 */
	void flushContents();

	/**
	 * Sets whether the contents of this monitor's underlying stream should be
	 * buffered. When <code>false</code>, contents appended to this stream monitor
	 * are not stored in a buffer, and are thus not available from
	 * <code>getContents()</code>. Registered listeners are notified of appended
	 * text, and must buffer the contents if desired.
	 *
	 * @param buffer whether the contents of this monitor's underlying stream
	 * should be buffered
	 */
	void setBuffered(boolean buffer);

	/**
	 * Returns whether the contents of this monitor's underlying stream is
	 * buffered.
	 *
	 * @return whether the contents of this monitor's underlying stream is
	 * buffered
	 */
	boolean isBuffered();
}

Back to the top