org.codehaus.mojo.scmchangelog
Class AbstractBufferedConsumer

java.lang.Object
  extended by org.codehaus.mojo.scmchangelog.AbstractBufferedConsumer
All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
Direct Known Subclasses:
SvnChangeLogConsumer, SvnListConsumer

public abstract class AbstractBufferedConsumer
extends Object
implements org.codehaus.plexus.util.cli.StreamConsumer

Abstract consumer for the return stream from the svn commands.

Version:
$Id: AbstractBufferedConsumer.java 7623 2008-09-09 08:46:14Z ehsavoie $
Author:
ehsavoie

Constructor Summary
AbstractBufferedConsumer()
           
 
Method Summary
abstract  List analyse()
          Parses the output of the command and returns a list of elements.
 void consumeLine(String line)
          Consume the output of a process and store it in a buffer.
 org.apache.maven.scm.log.ScmLogger getLogger()
           
protected  String getOutput()
          Returns the output.
 void setLogger(org.apache.maven.scm.log.ScmLogger scmLogger)
          Setter for the logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBufferedConsumer

public AbstractBufferedConsumer()
Method Detail

getLogger

public final org.apache.maven.scm.log.ScmLogger getLogger()
Returns:
a logger
See Also:
Command.getLogger()

setLogger

public final void setLogger(org.apache.maven.scm.log.ScmLogger scmLogger)
Setter for the logger.

Parameters:
scmLogger - the logger.
See Also:
Command.setLogger(org.apache.maven.scm.log.ScmLogger)

consumeLine

public void consumeLine(String line)
Consume the output of a process and store it in a buffer.

Specified by:
consumeLine in interface org.codehaus.plexus.util.cli.StreamConsumer
Parameters:
line - the line to be consumed and stored in the buffer.

getOutput

protected String getOutput()
Returns the output.

Returns:
the output.

analyse

public abstract List analyse()
Parses the output of the command and returns a list of elements.

Returns:
a list of elements.


Copyright © 2008-2009 Codehaus. All Rights Reserved.