org.apache.maven.shared.io.logging

## Class DefaultMessageHolder

- java.lang.Object
- - org.apache.maven.shared.io.logging.DefaultMessageHolder

All Implemented Interfaces:
  MessageHolder

    public class DefaultMessageHolder
    extends Object
    implements MessageHolder

Default Message Holder.

### Constructor Summary

Constructors
Constructor and Description
`DefaultMessageHolder()` Create instance.
`DefaultMessageHolder(int maxMessageLevel, int defaultMessageLevel)`
`DefaultMessageHolder(int maxMessageLevel, int defaultMessageLevel, MessageSink onDemandSink)`

### Method Summary

All Methods Instance Methods Concrete Methods
`MessageHolder` `addDebugMessage(CharSequence messagePart)`
`MessageHolder` `addDebugMessage(CharSequence messagePart, Throwable error)`
`MessageHolder` `addDebugMessage(Throwable error)`
`MessageHolder` `addErrorMessage(CharSequence messagePart)`
`MessageHolder` `addErrorMessage(CharSequence messagePart, Throwable error)`
`MessageHolder` `addErrorMessage(Throwable error)`
`MessageHolder` `addInfoMessage(CharSequence messagePart)`
`MessageHolder` `addInfoMessage(CharSequence messagePart, Throwable error)`
`MessageHolder` `addInfoMessage(Throwable error)`
`MessageHolder` `addMessage(CharSequence messagePart)`
`MessageHolder` `addMessage(CharSequence messagePart, Throwable error)`
`protected MessageHolder` `addMessage(int level, CharSequence messagePart)`
`protected MessageHolder` `addMessage(int level, CharSequence messagePart, Throwable error)`
`protected MessageHolder` `addMessage(int level, Throwable error)`
`MessageHolder` `addMessage(Throwable error)`
`MessageHolder` `addSevereMessage(CharSequence messagePart)`
`MessageHolder` `addSevereMessage(CharSequence messagePart, Throwable error)`
`MessageHolder` `addSevereMessage(Throwable error)`
`MessageHolder` `addWarningMessage(CharSequence messagePart)`
`MessageHolder` `addWarningMessage(CharSequence messagePart, Throwable error)`
`MessageHolder` `addWarningMessage(Throwable error)`
`MessageHolder` `append(CharSequence messagePart)`
`MessageHolder` `append(Throwable error)`
`int` `countDebugMessages()`
`int` `countErrorMessages()`
`int` `countInfoMessages()`
`int` `countMessages()`
`int` `countSevereMessages()`
`int` `countWarningMessages()`
`void` `flush()` flush.
`boolean` `isDebugEnabled()`
`boolean` `isEmpty()`
`boolean` `isErrorEnabled()`
`boolean` `isInfoEnabled()`
`boolean` `isSevereEnabled()`
`boolean` `isWarningEnabled()`
`MessageHolder` `newDebugMessage()`
`MessageHolder` `newErrorMessage()`
`MessageHolder` `newInfoMessage()`
`MessageHolder` `newMessage()`
`protected void` `newMessage(int messageLevel)`
`MessageHolder` `newSevereMessage()`
`MessageHolder` `newWarningMessage()`
`String` `render()`
`void` `render(MessageSink sink)`
`protected void` `renderTo(org.apache.maven.shared.io.logging.DefaultMessageHolder.Message message, MessageSink sink)`
`void` `setDebugEnabled(boolean enabled)`
`void` `setErrorEnabled(boolean enabled)`
`void` `setInfoEnabled(boolean enabled)`
`void` `setSevereEnabled(boolean enabled)`
`void` `setWarningEnabled(boolean enabled)`
`int` `size()`

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

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

### Constructor Detail

#### DefaultMessageHolder

    public DefaultMessageHolder()

Create instance.

#### DefaultMessageHolder

    public DefaultMessageHolder(int maxMessageLevel,
                                int defaultMessageLevel)

Parameters:
  `maxMessageLevel` - max message level.
  `defaultMessageLevel` - default message level.

#### DefaultMessageHolder

    public DefaultMessageHolder(int maxMessageLevel,
                                int defaultMessageLevel,
                                MessageSink onDemandSink)

Parameters:
  `maxMessageLevel` - max message level.
  `defaultMessageLevel` - default message level.
  `onDemandSink` - `MessageSink`

### Method Detail

#### addMessage

    public MessageHolder addMessage(CharSequence messagePart,
                                    Throwable error)

Specified by:
  `addMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - Message Part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addMessage

    protected MessageHolder addMessage(int level,
                                       CharSequence messagePart,
                                       Throwable error)

Parameters:
  `level` - Level.
  `messagePart` - Message part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addMessage

    public MessageHolder addMessage(CharSequence messagePart)

Specified by:
  `addMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
Returns:
  `MessageHolder`

#### addMessage

    protected MessageHolder addMessage(int level,
                                       CharSequence messagePart)

Parameters:
  `level` - level.
  `messagePart` - message part.
Returns:
  `MessageHolder`

#### addMessage

    public MessageHolder addMessage(Throwable error)

Specified by:
  `addMessage` in interface `MessageHolder`
Parameters:
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addMessage

    protected MessageHolder addMessage(int level,
                                       Throwable error)

Parameters:
  `level` - level.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### append

    public MessageHolder append(CharSequence messagePart)

Specified by:
  `append` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
Returns:
  `MessageHolder`

#### append

    public MessageHolder append(Throwable error)

Specified by:
  `append` in interface `MessageHolder`
Parameters:
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `MessageHolder`
Returns:
  true if empty false otherwise.

#### newMessage

    public MessageHolder newMessage()

Specified by:
  `newMessage` in interface `MessageHolder`
Returns:
  `MessageHolder`

#### newMessage

    protected void newMessage(int messageLevel)

Parameters:
  `messageLevel` - message level.

#### render

    public String render()

Specified by:
  `render` in interface `MessageHolder`
Returns:
  rendered.

#### size

    public int size()

Specified by:
  `size` in interface `MessageHolder`
Returns:
  the size.

#### addDebugMessage

    public MessageHolder addDebugMessage(CharSequence messagePart,
                                         Throwable error)

Specified by:
  `addDebugMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addDebugMessage

    public MessageHolder addDebugMessage(CharSequence messagePart)

Specified by:
  `addDebugMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - messages part.
Returns:
  `MessageHolder`

#### addDebugMessage

    public MessageHolder addDebugMessage(Throwable error)

Specified by:
  `addDebugMessage` in interface `MessageHolder`
Parameters:
  `error` - messages part.
Returns:
  `MessageHolder`

#### addErrorMessage

    public MessageHolder addErrorMessage(CharSequence messagePart,
                                         Throwable error)

Specified by:
  `addErrorMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addErrorMessage

    public MessageHolder addErrorMessage(CharSequence messagePart)

Specified by:
  `addErrorMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
Returns:
  `MessageHolder`

#### addErrorMessage

    public MessageHolder addErrorMessage(Throwable error)

Specified by:
  `addErrorMessage` in interface `MessageHolder`
Parameters:
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addInfoMessage

    public MessageHolder addInfoMessage(CharSequence messagePart,
                                        Throwable error)

Specified by:
  `addInfoMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addInfoMessage

    public MessageHolder addInfoMessage(CharSequence messagePart)

Specified by:
  `addInfoMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - messages part.
Returns:
  `MessageHolder`

#### addInfoMessage

    public MessageHolder addInfoMessage(Throwable error)

Specified by:
  `addInfoMessage` in interface `MessageHolder`
Parameters:
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addSevereMessage

    public MessageHolder addSevereMessage(CharSequence messagePart,
                                          Throwable error)

Specified by:
  `addSevereMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addSevereMessage

    public MessageHolder addSevereMessage(CharSequence messagePart)

Specified by:
  `addSevereMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
Returns:
  `MessageHolder`

#### addSevereMessage

    public MessageHolder addSevereMessage(Throwable error)

Specified by:
  `addSevereMessage` in interface `MessageHolder`
Parameters:
  `error` - The error.
Returns:
  `MessageHolder`

#### addWarningMessage

    public MessageHolder addWarningMessage(CharSequence messagePart,
                                           Throwable error)

Specified by:
  `addWarningMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### addWarningMessage

    public MessageHolder addWarningMessage(CharSequence messagePart)

Specified by:
  `addWarningMessage` in interface `MessageHolder`
Parameters:
  `messagePart` - message part.
Returns:
  `MessageHolder`

#### addWarningMessage

    public MessageHolder addWarningMessage(Throwable error)

Specified by:
  `addWarningMessage` in interface `MessageHolder`
Parameters:
  `error` - `Throwable`
Returns:
  `MessageHolder`

#### countDebugMessages

    public int countDebugMessages()

Specified by:
  `countDebugMessages` in interface `MessageHolder`
Returns:
  count number of debug messages.

#### countErrorMessages

    public int countErrorMessages()

Specified by:
  `countErrorMessages` in interface `MessageHolder`
Returns:
  count number of error messages.

#### countInfoMessages

    public int countInfoMessages()

Specified by:
  `countInfoMessages` in interface `MessageHolder`
Returns:
  count number of info messages.

#### countMessages

    public int countMessages()

Specified by:
  `countMessages` in interface `MessageHolder`
Returns:
  count number of messages.

#### countSevereMessages

    public int countSevereMessages()

Specified by:
  `countSevereMessages` in interface `MessageHolder`
Returns:
  count number of server messages.

#### countWarningMessages

    public int countWarningMessages()

Specified by:
  `countWarningMessages` in interface `MessageHolder`
Returns:
  count number of warning messages.

#### isDebugEnabled

    public boolean isDebugEnabled()

Specified by:
  `isDebugEnabled` in interface `MessageHolder`
Returns:
  true / false.

#### isErrorEnabled

    public boolean isErrorEnabled()

Specified by:
  `isErrorEnabled` in interface `MessageHolder`
Returns:
  true if error is enabled false otherwise.

#### isInfoEnabled

    public boolean isInfoEnabled()

Specified by:
  `isInfoEnabled` in interface `MessageHolder`
Returns:
  true if info is enabled false otherwise.

#### isSevereEnabled

    public boolean isSevereEnabled()

Specified by:
  `isSevereEnabled` in interface `MessageHolder`
Returns:
  true if server is enabled false otherwise.

#### isWarningEnabled

    public boolean isWarningEnabled()

Specified by:
  `isWarningEnabled` in interface `MessageHolder`
Returns:
  true if warning is enabled false otherwise.

#### newDebugMessage

    public MessageHolder newDebugMessage()

Specified by:
  `newDebugMessage` in interface `MessageHolder`
Returns:
  `MessageHolder`

#### newErrorMessage

    public MessageHolder newErrorMessage()

Specified by:
  `newErrorMessage` in interface `MessageHolder`
Returns:
  `MessageHolder`

#### newInfoMessage

    public MessageHolder newInfoMessage()

Specified by:
  `newInfoMessage` in interface `MessageHolder`
Returns:
  `MessageHolder`

#### newSevereMessage

    public MessageHolder newSevereMessage()

Specified by:
  `newSevereMessage` in interface `MessageHolder`
Returns:
  `MessageHolder`

#### newWarningMessage

    public MessageHolder newWarningMessage()

Specified by:
  `newWarningMessage` in interface `MessageHolder`
Returns:
  `MessageHolder`

#### setDebugEnabled

    public void setDebugEnabled(boolean enabled)

Specified by:
  `setDebugEnabled` in interface `MessageHolder`
Parameters:
  `enabled` - enable debug

#### setErrorEnabled

    public void setErrorEnabled(boolean enabled)

Specified by:
  `setErrorEnabled` in interface `MessageHolder`
Parameters:
  `enabled` - enable error or disable.

#### setInfoEnabled

    public void setInfoEnabled(boolean enabled)

Specified by:
  `setInfoEnabled` in interface `MessageHolder`
Parameters:
  `enabled` - true info enable false otherwise.

#### setSevereEnabled

    public void setSevereEnabled(boolean enabled)

Specified by:
  `setSevereEnabled` in interface `MessageHolder`
Parameters:
  `enabled` - enable server or disable.

#### setWarningEnabled

    public void setWarningEnabled(boolean enabled)

Specified by:
  `setWarningEnabled` in interface `MessageHolder`
Parameters:
  `enabled` - enable warning or disable.

#### flush

    public void flush()

flush.

Specified by:
  `flush` in interface `MessageHolder`

#### render

    public void render(MessageSink sink)

Specified by:
  `render` in interface `MessageHolder`
Parameters:
  `sink` - `MessageSink`

#### renderTo

    protected void renderTo(org.apache.maven.shared.io.logging.DefaultMessageHolder.Message message,
                            MessageSink sink)

Parameters:
  `message` - `Message`
  `sink` - `MessageSink`