- All Superinterfaces:
IOutputChannel
- All Known Implementing Classes:
Output
The output manager is responsible for managing a collection of registered
output channels. It provides methods to register and remove channels as
well as control buffering. When text is written to the manager then it
is sent to all registered output channels.
This interface is an extension of IOutputChannel so as to enforce consistency
between the declarations for printing text to an output channel. The manager
is in effect acting as a single proxy channel for all of it's individually
registered channels.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChannel
(IOutputChannel channel) Adds a channel to the list of registered channels.void
Clears the current buffer contents.Gets the current buffer contents.Creates a print stream for this output objectvoid
Remove all registered channelsvoid
removeChannel
(IOutputChannel channel) Removes a specific channel for a particular type.void
removeChannel
(Class<?> type) Removes all registered channels for a particular type.void
setBuffering
(boolean enabled) Enabling buffering will cause the output from commands to be written to an internal buffer rather than immediately to the underlying output channels.Methods declared in interface com.ibm.jvm.dtfjview.spi.IOutputChannel
close, flush, print, println, printPrompt
-
Method Details
-
setBuffering
void setBuffering(boolean enabled) Enabling buffering will cause the output from commands to be written to an internal buffer rather than immediately to the underlying output channels. This is typically used by clients to inspect or intercept the results from a command before carrying out further processing. By default buffering is not enabled.- Parameters:
enabled
- true turns on buffering
-
clearBuffer
void clearBuffer()Clears the current buffer contents. -
getBuffer
String getBuffer()Gets the current buffer contents.- Returns:
- buffer contents
-
addChannel
Adds a channel to the list of registered channels.- Parameters:
channel
- channel to add.
-
removeChannel
Removes all registered channels for a particular type.- Parameters:
type
-
-
removeChannel
Removes a specific channel for a particular type. For this to be successful the underlying implementation must override hashcode and equals.- Parameters:
type
-
-
removeAllChannels
void removeAllChannels()Remove all registered channels -
getPrintStream
PrintStream getPrintStream()Creates a print stream for this output object- Returns:
-