public abstract class ViewerContext extends Object
A viewer context contains a viewer ID and data which can be displayed in a viewer in the Console. Every viewer in the Console has a corresponding viewer context class in this library. A viewer context is capable of processing data and to format them in a way so that the corresponding viewer in the Console can display it.
Viewer contexts provide a simple way to extend the functionality of the SmartInspect Java library. See the Session.logCustomContext method for a detailed example.
This class is not guaranteed to be threadsafe.
| Modifier | Constructor and Description |
|---|---|
protected |
ViewerContext(ViewerId vi)
Creates and initializes a ViewerContext instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases any resources of this viewer context.
|
abstract byte[] |
getViewerData()
Returns the actual data which will be displayed in the viewer
specified by the getViewerId method.
|
ViewerId |
getViewerId()
Returns the viewer ID which specifies the viewer to use in
the Console.
|
protected ViewerContext(ViewerId vi)
vi - The viewer ID to usepublic ViewerId getViewerId()
public abstract byte[] getViewerData()
public void close()
The default implementation does nothing. Derived classes can change this behavior by overriding this method.
Copyright © 2023. All rights reserved.