站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

CommandOutputCollector (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.commands
Class CommandOutputCollector

java.lang.Object
  extended byorg.netbeans.modules.vcscore.commands.CommandOutputCollector
All Implemented Interfaces:
CommandProcessListener, EventListener

public final class CommandOutputCollector
extends Object
implements CommandProcessListener

The collector of commands' output. Temporary disk files are used to store the output to keep a small memory footprint.


Constructor Summary
CommandOutputCollector(CommandTask task, VcsCommandsProvider provider)
           
 
Method Summary
 void addRegexErrorListener(RegexOutputListener l)
          Add the listener to the data error output of the command.
 void addRegexErrorListener(RegexOutputListener l, boolean asynch)
          Add the listener to the data error output of the command.
 void addRegexOutputListener(RegexOutputListener l)
          Add the listener to the data output of the command.
 void addRegexOutputListener(RegexOutputListener l, boolean asynch)
          Add the listener to the data output of the command.
 void addTextErrorListener(TextOutputListener l)
          Add the listener to the error output of the command.
 void addTextErrorListener(TextOutputListener l, boolean asynch)
          Add the listener to the error output of the command.
 void addTextOutputListener(TextOutputListener l)
          Add the listener to the standard output of the command.
 void addTextOutputListener(TextOutputListener l, boolean asynch)
          Add the listener to the standard output of the command.
 void commandDone(CommandTaskInfo info)
          This method is called when the command is done.
 void commandPreprocessed(Command cmd, boolean status)
          Called when the preprocessing of the command finished.
 void commandPreprocessing(Command cmd)
          Called when the command is just to be preprocessed.
 void commandStarting(CommandTaskInfo info)
          This method is called when the command is just to be started.
protected  void finalize()
           
 VcsCommandsProvider getProvider()
          Get the commands provider.
 boolean isCmdOutput(int outputId)
          Tells whether there is actually some output with the given ID.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandOutputCollector

public CommandOutputCollector(CommandTask task,
                              VcsCommandsProvider provider)
Method Detail

isCmdOutput

public boolean isCmdOutput(int outputId)
Tells whether there is actually some output with the given ID.

Parameters:
outputId - The output ID: 0 - standard output, 1 - error output, 2 - standard data output, 3 - error data output.

getProvider

public VcsCommandsProvider getProvider()
Get the commands provider. The listener gets events only from commands, that are instances of ProvidedCommand and their provider equals to this provider. If returns null, the listener gets events from all commands.

Specified by:
getProvider in interface CommandProcessListener
Returns:
The provider or null.

commandPreprocessed

public void commandPreprocessed(Command cmd,
                                boolean status)
Called when the preprocessing of the command finished.

Specified by:
commandPreprocessed in interface CommandProcessListener
Parameters:
cmd - The command which was preprocessed.
status - The status of preprocessing. If false, the command is not executed. Probably never called.

commandPreprocessing

public void commandPreprocessing(Command cmd)
Called when the command is just to be preprocessed. Probably never called.

Specified by:
commandPreprocessing in interface CommandProcessListener

commandStarting

public void commandStarting(CommandTaskInfo info)
This method is called when the command is just to be started.

Specified by:
commandStarting in interface CommandProcessListener

commandDone

public void commandDone(CommandTaskInfo info)
This method is called when the command is done.

Specified by:
commandDone in interface CommandProcessListener

addTextOutputListener

public void addTextOutputListener(TextOutputListener l)
Add the listener to the standard output of the command. The listeners are removed when the command finishes. The output is passed to the listener asynchronously.


addTextOutputListener

public void addTextOutputListener(TextOutputListener l,
                                  boolean asynch)
Add the listener to the standard output of the command. The listeners are removed when the command finishes.

Parameters:
asynch - When true, the output is passed to the listener asynchronously. When false, the listener gets available output immediately during the addition.

addTextErrorListener

public void addTextErrorListener(TextOutputListener l)
Add the listener to the error output of the command. The listeners are removed when the command finishes. The output is passed to the listener asynchronously.


addTextErrorListener

public void addTextErrorListener(TextOutputListener l,
                                 boolean asynch)
Add the listener to the error output of the command. The listeners are removed when the command finishes.

Parameters:
asynch - When true, the output is passed to the listener asynchronously. When false, the listener gets available output immediately during the addition.

addRegexOutputListener

public void addRegexOutputListener(RegexOutputListener l)
Add the listener to the data output of the command. This output may contain a parsed information from its standard output or some other data provided by this command. The listeners are removed when the command finishes. The output is passed to the listener asynchronously.


addRegexOutputListener

public void addRegexOutputListener(RegexOutputListener l,
                                   boolean asynch)
Add the listener to the data output of the command. This output may contain a parsed information from its standard output or some other data provided by this command. The listeners are removed when the command finishes.

Parameters:
asynch - When true, the output is passed to the listener asynchronously. When false, the listener gets available output immediately during the addition.

addRegexErrorListener

public void addRegexErrorListener(RegexOutputListener l)
Add the listener to the data error output of the command. This output may contain a parsed information from its error output or some other data provided by this command. If there are some data given to this listener, the command is supposed to fail. The listeners are removed when the command finishes. The output is passed to the listener asynchronously.


addRegexErrorListener

public void addRegexErrorListener(RegexOutputListener l,
                                  boolean asynch)
Add the listener to the data error output of the command. This output may contain a parsed information from its error output or some other data provided by this command. If there are some data given to this listener, the command is supposed to fail. The listeners are removed when the command finishes.

Parameters:
asynch - When true, the output is passed to the listener asynchronously. When false, the listener gets available output immediately during the addition.

finalize

protected void finalize()

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.