MessageBuilder

public abstract class MessageBuilder<T>

A builder which is used during message parsing to create a message object which encapsulates all the formatting requirements of a log message. One message builder is created for each log message that's parsed.

Parameters

<T>

The message type being built.

Inheritors

Constructors

Link copied to clipboard
public void MessageBuilder(TemplateContext context)

Functions

Link copied to clipboard
public final void addParameter(int termStart, int termEnd, Parameter param)
Called by parser implementations to signify that the parsing of the next parameter is complete.
Link copied to clipboard
protected abstract void addParameterImpl(int termStart, int termEnd, Parameter param)
Adds the specified parameter to the format instance currently being built.
Link copied to clipboard
public final T build()
Builds a log message using the current message context.
Link copied to clipboard
protected abstract T buildImpl()
Returns the implementation specific result of parsing the current log message.
Link copied to clipboard
public final int getExpectedArgumentCount()
Returns the expected number of arguments to be formatted by this message.
Link copied to clipboard
public final String getMessage()
Returns the log format message to be parsed by this builder.
Link copied to clipboard
public final MessageParser getParser()
Returns the parser used to process the log format message in this builder.