public abstract class AbstractContext extends Object implements Context
Contexts are encouraged to derive from this abstract class because all they have
to do then is to implement/override injectExportableParams(Map)
and feed
the data they want to be extracted. The actual extraction and formatting then
comes for free.
Context.ExportFormat
Constructor and Description |
---|
AbstractContext() |
Modifier and Type | Method and Description |
---|---|
String |
exportAsString(Context.ExportFormat format)
Export this context into the specified format.
|
void |
injectExportableParams(Map<String,Object> input)
This method needs to be implemented by the actual context implementations to
inject the params they need for exporting.
|
String |
toString() |
public void injectExportableParams(Map<String,Object> input)
input
- pass exportable params in here.public String exportAsString(Context.ExportFormat format)
Context
exportAsString
in interface Context
format
- the format to export into.Copyright © 2020 Couchbase, Inc.. All rights reserved.