org.apache.maven.scm.util

## Class AbstractConsumer

- java.lang.Object
- - org.apache.maven.scm.util.AbstractConsumer

All Implemented Interfaces:
  org.codehaus.plexus.util.cli.StreamConsumer

Direct Known Subclasses:
  AnnotateConsumer, BazaarConsumer, ClearCaseBlameConsumer, ClearCaseChangeLogConsumer, CvsBlameConsumer, CvsChangeLogConsumer, GitBlameConsumer, GitChangeLogConsumer, GitCurrentBranchConsumer, GitInfoConsumer, GitLatestRevisionCommandConsumer, HgConsumer, PerforceBlameConsumer, PerforceChangeLogConsumer, PerforceChangesConsumer, PerforceDescribeConsumer, PerforceFilelogConsumer, PerforceHaveConsumer, StarteamChangeLogConsumer, SvnBlameConsumer, SvnChangeLogConsumer, SynergyCreateTaskConsumer, SynergyGetCompletedTasksConsumer, SynergyGetTaskObjectsConsumer, SynergyShowDefaultTaskConsumer, TfsBlameConsumer, TfsChangeLogConsumer

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

Author:
  Emmanuel Venisse

### Constructor Summary

Constructors
Constructor and Description
`AbstractConsumer(ScmLogger logger)` AbstractConsumer constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`ScmLogger` `getLogger()`
`protected Date` `parseDate(String date, String userPattern, String defaultPattern)` Converts the date timestamp from the output into a date object.
`protected Date` `parseDate(String date, String userPattern, String defaultPattern, Locale locale)` Converts the date timestamp from the output into a date object.
`void` `setLogger(ScmLogger logger)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.codehaus.plexus.util.cli.StreamConsumer

`consumeLine`

### Constructor Detail

#### AbstractConsumer

    public AbstractConsumer(ScmLogger logger)

AbstractConsumer constructor.

Parameters:
  `logger` - The logger to use in the consumer

### Method Detail

#### getLogger

    public ScmLogger getLogger()

#### setLogger

    public void setLogger(ScmLogger logger)

#### parseDate

    protected Date parseDate(String date,
                             String userPattern,
                             String defaultPattern)

Converts the date timestamp from the output into a date object.

Returns:
  A date representing the timestamp of the log entry.

#### parseDate

    protected Date parseDate(String date,
                             String userPattern,
                             String defaultPattern,
                             Locale locale)

Converts the date timestamp from the output into a date object.

Returns:
  A date representing the timestamp of the log entry.