Package 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 java.lang.Object
    implements org.codehaus.plexus.util.cli.StreamConsumer

Author:
  Emmanuel Venisse

### Constructor Summary

Constructors
`AbstractConsumer​(ScmLogger logger)` AbstractConsumer constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`ScmLogger` `getLogger()`
`protected java.util.Date` `parseDate​(java.lang.String date, java.lang.String userPattern, java.lang.String defaultPattern)` Converts the date timestamp from the output into a date object.
`protected java.util.Date` `parseDate​(java.lang.String date, java.lang.String userPattern, java.lang.String defaultPattern, java.util.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 java.util.Date parseDate​(java.lang.String date,
                                       java.lang.String userPattern,
                                       java.lang.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 java.util.Date parseDate​(java.lang.String date,
                                       java.lang.String userPattern,
                                       java.lang.String defaultPattern,
                                       java.util.Locale locale)

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

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