protected abstract static class StructuredFormatter.Generator extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Generator() |
| Modifier and Type | Method and Description |
|---|---|
StructuredFormatter.Generator |
add(String key,
int value)
Writes an integer value.
|
StructuredFormatter.Generator |
add(String key,
long value)
Writes a long value.
|
abstract StructuredFormatter.Generator |
add(String key,
Map<String,?> value)
Writes a map value
|
abstract StructuredFormatter.Generator |
add(String key,
String value)
Writes a string value.
|
abstract StructuredFormatter.Generator |
addStackTrace(Throwable throwable)
Writes the stack trace.
|
StructuredFormatter.Generator |
begin()
Initial method invoked at the start of the generation.
|
abstract StructuredFormatter.Generator |
end()
Writes any trailing data that's needed.
|
public StructuredFormatter.Generator begin() throws Exception
Exception - if an error occurs while adding the datapublic StructuredFormatter.Generator add(String key, int value) throws Exception
key - they keyvalue - the valueException - if an error occurs while adding the datapublic StructuredFormatter.Generator add(String key, long value) throws Exception
key - they keyvalue - the valueException - if an error occurs while adding the datapublic abstract StructuredFormatter.Generator add(String key, Map<String,?> value) throws Exception
key - the key for the mapvalue - the mapException - if an error occurs while adding the datapublic abstract StructuredFormatter.Generator add(String key, String value) throws Exception
key - the key for the valuevalue - the string valueException - if an error occurs while adding the datapublic abstract StructuredFormatter.Generator addStackTrace(Throwable throwable) throws Exception
The implementation is allowed to write the stack trace however is desirable. For example the frames of the
stack trace can be broken down into an array or Throwable.printStackTrace() could be used to
represent the stack trace.
throwable - the exception to write the stack trace for or null if there is no throwableException - if an error occurs while adding the datapublic abstract StructuredFormatter.Generator end() throws Exception
Exception - if an error occurs while adding the data during the buildCopyright © 2015 JBoss by Red Hat. All rights reserved.