...
Code Block |
---|
class DefaultPreview implements PreviewContext, PreviewEmitter { // implementation for methods, emit, getEmittedRecords, getLogs and getMetrics. } |
Code Block |
---|
@Singleton
class PreviewHelper {
Map<PreviewId, DefaultPreview> previewIdToDefaultPreview;
PreviewEmitter getPreviewEmitter(PreviewId identifier) {
// create DefaultPreview for identifier in previewIdToDefaultPreview and return if doesn't exist already, else get and return.
}
PreviewContext getPreviewContext(PreviewId identifier) {
// create DefaultPreview for identifier in previewIdToDefaultPreview and return if doesn't exist already, else get and return.
}
} |
...