public class SmartInspect extends Object
The SmartInspect class is the most important class in the SmartInspect Java library. An instance of this class is able to write log messages to a file or to send them directly to the SmartInspect Console using TCP. You can control these connections by passing a connections string to the setConnections method.
The SmartInspect class offers several properties for controlling the logging behavior. Besides the setConnections method there is the setEnabled method which controls if log messages should be sent or not. Furthermore, the setAppName method specifies the application name displayed in the SmartInspect Console. And last but not least, we have the setLevel and setDefaultLevel methods which let you specify the log level of an SmartInspect object and its related sessions.
Additionally, the SmartInspect class acts as parent for sessions, which contain the actual logging methods, like, for example, Session.logMessage or Session.logObject. It is possible and common that several different sessions have the same parent and thus share the same connections. The Session class contains dozens of useful methods for logging any kind of data. Sessions can even log variable watches, generate illustrated process and thread information or control the behavior of the SmartInspect Console. It is possible, for example, to clear the entire log in the Console by calling the Session.clearLog method.
To accomplish these different tasks the SmartInspect concept uses several different packets. The SmartInspect class manages these packets and logs them to its connections. It is possibility to register event handlers for every packet type which are called after a corresponding packet has been sent.
The error handling in the SmartInspect Java library is a little bit
different from other libraries. This library uses an event, the
SmartInspectListener.onError(com.gurock.smartinspect.ErrorEvent), for reporting errors.
We've chosen this way because a logging framework should not alter the
behavior of an application by firing exceptions. The only exception
you need to handle can be thrown by the setConnections method if
the setConnections(java.lang.String) contains errors.
This class is fully threadsafe.
| Constructor and Description |
|---|
SmartInspect(String appName)
Initializes a new instance of the SmartInspect class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(SmartInspectListener listener)
Adds a new listener for the events of this object.
|
void |
addSession(Session session)
Overloaded.
|
Session |
addSession(String sessionName)
Adds and returns a new Session instance with this SmartInspect object set as parent.
|
Session |
addSession(String sessionName,
boolean store)
Overloaded.
|
void |
clearListeners()
Removes all registered listeners for the events of this object.
|
void |
deleteSession(Session session)
Removes a session from the internal list of sessions.
|
void |
dispatch(String caption,
int action,
Object state)
Executes a custom protocol action of a connection.
|
void |
dispose()
Releases all resources of this SmartInspect object.
|
protected void |
doControlCommand(ControlCommand controlCommand)
Invokes the Control Command event handlers.
|
protected void |
doError(Exception ex)
Invokes the Error event handlers.
|
protected boolean |
doFilter(Packet packet)
Invokes the Filter event handlers and determines if the supplied packet should be sent or not.
|
protected void |
doLogEntry(LogEntry logEntry)
Invokes the Log Entry event handlers.
|
protected void |
doProcessFlow(ProcessFlow processFlow)
Invokes the Process Flow event handlers.
|
protected void |
doWatch(Watch watch)
Invokes the Watch event handlers.
|
String |
getAppName()
The application name helps you to identify Log Entries from
different applications in the SmartInspect Console.
|
String |
getConnections()
Please see the setConnections method for a detailed description
of the connections string and its function.
|
Level |
getDefaultLevel()
Returns the default log level of this SmartInspect instance
and its related sessions.
|
String |
getHostName()
Returns the hostname of the sending machine.
|
Level |
getLevel()
Returns the log level of this SmartInspect instance and its related sessions.
|
ClockResolution |
getResolution()
Returns the timestamp resolution mode for this SmartInspect object.
|
Session |
getSession(String sessionName)
Returns a previously added session.
|
SessionDefaults |
getSessionDefaults()
Returns the default property values for new sessions.
|
String |
getVariable(String key)
Returns the value of a connection variable.
|
static String |
getVersion()
Returns the version number of the SmartInspect Java library.
|
boolean |
isEnabled()
Returns a boolean value which indicates if this instance is
enabled or not.
|
void |
loadConfiguration(String fileName)
Loads the properties and sessions of this SmartInspect instance from a file.
|
void |
loadConnections(String fileName)
Overloaded.
|
void |
loadConnections(String fileName,
boolean doNotEnable)
Overloaded.
|
long |
now()
Returns the current date and time, optionally with a high resolution.
|
void |
removeListener(SmartInspectListener listener)
Removes an existing listener for the events of this object.
|
void |
sendControlCommand(ControlCommand controlCommand)
Logs a Control Command.
|
void |
sendLogEntry(LogEntry logEntry)
Logs a Log Entry.
|
void |
sendProcessFlow(ProcessFlow processFlow)
Logs a Process Flow entry.
|
void |
sendWatch(Watch watch)
Logs a Watch.
|
void |
setAppName(String appName)
Sets the application name used for the Log Entries.
|
void |
setConnections(String connections)
Sets all connections used by a SmartInspect instance.
|
void |
setDefaultLevel(Level level)
Returns the default log level of this SmartInspect instance and its related sessions.
|
void |
setEnabled(boolean enabled)
This method allows you to control if anything should be
logged at all.
|
void |
setLevel(Level level)
Sets the log level of this SmartInspect instance and its related sessions.
|
void |
setResolution(ClockResolution resolution)
Specifies the timestamp resolution mode for this SmartInspect object.
|
void |
setVariable(String key,
String value)
Adds a new or updates an existing connection variable.
|
void |
unsetVariable(String key)
Unsets an existing connection variable
|
void |
updateSession(Session session,
String to,
String from)
Updates an entry in the internal lookup table of sessions.
|
public SmartInspect(String appName)
appName - The application name used for Log Entriespublic long now()
If the getResolution method specifies using a high resolution for timestamps, this method tries to return a timestamp with a microsecond resolution.
The SmartInspect Java library needs an external DLL to be able to use high-resolution timestamps. This DLL is called SmartInspect.Java.dll. If this DLL cannot be found during application startup, high-resolution support is not available. Additionally, even if this DLL is found and loaded correctly, high-resolution timestamps are only available if the QueryPerformanceCounter and QueryPerformanceFrequency Windows functions indicate a successfully working high-resolution performance counter.
If high-resolution support is not available, this method simply returns the local date and time with the help of the System.currentTimeMillis() function and the default time zone.
public ClockResolution getResolution()
ClockResolutionpublic void setResolution(ClockResolution resolution)
The SmartInspect Java library needs an external DLL to be able to use high-resolution timestamps. This DLL is called SmartInspect.Java.dll. If this DLL cannot be found during application startup, high-resolution support is not available. Additionally, even if this DLL is found and loaded correctly, high-resolution timestamps are only available if the QueryPerformanceCounter and QueryPerformanceFrequency Windows functions indicate a successfully working high-resolution performance counter.
Please note that high-resolution timestamps are not intended to be used on production systems. It is recommended to use them only during development and debugging. High-resolution timestamps can introduce several problems that are acceptable on development machines but normally not tolerable on production systems:
| Problem | Description |
|---|---|
| Performance | High-resolution timestamps can be a lot slower than standard timestamps. This actually depends on the concrete implementation of QueryPerformanceCounter (i.e. which timer is used for the high-resolution performance counter [PIT, PMT, TSC, HPET]), but in general one can say that standard timestamps are a lot faster to read. |
| Accuracy | High-resolution timestamps tend to deviate from the system timer when seen over a longer period of time. Depending on the particular QueryPerformanceCounter implementation, it can happen that high-resolution timestamps induce an error of milliseconds within a few minutes only. |
| Reliability | Depending on the used timer, QueryPerformanceCounter provides unreliable results under certain, not so uncommon, circumstances. When the TSC timer is used, multi-processor/multi-core systems or processors with varying frequencies (like found in most modern notebooks or desktop machines) are known to cause several problems which make high-resolution timestamps unsuitable for production usage. |
Due to the mentioned problems, this setting defaults to using the standard timestamp resolution. If null is passed as argument, the timestamp resolution is not changed.
resolution - The new timestamp resolution mode for this SmartInspect objectClockResolutionpublic static String getVersion()
public String getHostName()
This method returns the hostname of the current machine. The hostname helps you to identify Log Entries from different machines in the SmartInspect Console.
public String getAppName()
public void setAppName(String appName)
The application name helps you to identify Log Entries from different applications in the SmartInspect Console. If you set this property to null, the application name will be empty when sending Log Entries
appName - application namepublic Level getLevel()
The getLevel and setLevel methods of this SmartInspect instance represent the log level used by its corresponding sessions to determine if information should be logged or not. The default return value of this method is Level.Debug.
Please see the corresponding setLevel method for more information on how to use the log level.
public void setLevel(Level level)
The getLevel and setLevel methods of this SmartInspect instance represent the log level used by its corresponding sessions to determine if information should be logged or not. The default log level is Level.Debug.
Every method (except the clear method family) in the Session class tests if its log level equals or is greater than the log level of its parent. If this is not the case, the methods return immediately and won't log anything.
The log level for a method in the Session class can either be specified explicitly by passing a Level argument or implicitly by using the setDefaultLevel method. Every method in the Session class which makes use of the parent's log level and does not take a Level argument, uses the setDefaultLevel method of its parent to get the log level.
Please note that this method does nothing if the supplied level argument is null. For more information about the default level, please refer to the documentation of the setDefaultLevel method.
import com.gurock.smartinspect.*;
public class Program {
static void method() {
SiAuto.main.enterMethod(Level.Debug, "Method");
try {
// ...
} finally {
SiAuto.main.leaveMethod(Level.Debug, "Method");
}
}
public static void main(String[] args) {
SiAuto.si.setEnabled(true);
SiAuto.si.setLevel(Level.Debug);
method(); // Logs enterMethod and leaveMethod calls.
SiAuto.si.setLevel(Level.Message);
method(); // Ignores enterMethod and leaveMethod calls.
}
}
level - The new log levelpublic Level getDefaultLevel()
The getDefaultLevel and setDefaultLevel methods of this SmartInspect instance represent the default log level used by its corresponding sessions. The default return value of this method is Level.Message.
Please see the corresponding setDefaultLevel method for more information on how to use the default log level.
public void setDefaultLevel(Level level)
The getDefaultLevel and setDefaultLevel methods of this SmartInspect instance represent the default log level used by its corresponding sessions. The default value for the default log level is Level.Message.
Every method in the Session class which makes use of the parent's log level and does not take a Level argument, uses the default level of its parent as log level.
Please note that this method does nothing if the supplied level argument is null. For more information on how to use this method, please have a look at the following examples.
Example:
import com.gurock.smartinspect.*;
public class Program {
static void method() {
SiAuto.main.enterMethod("Method");
try {
// ...
} finally {
SiAuto.main.leaveMethod("Method");
}
}
public static void main(String[] args) {
SiAuto.si.setEnabled(true);
SiAuto.si.setLevel(Level.Debug);
SiAuto.si.setDefaultLevel(Level.Verbose);
// Since the enterMethod and leaveMethod calls do not
// specify their log level explicitly (by passing a Level
// argument), they use the default log level which has
// just been set to Level.Verbose (see above). And since
// the log level of the SiAuto.si object is set to
// Level.Debug, the enterMethod and leaveMethod calls will
// be logged.
method(); // Logs enterMethod and leaveMethod calls.
SiAuto.si.setLevel(Level.Message);
// Since enterMethod and leaveMethod still use Level.Verbose
// as their log level and the log level of the SiAuto.si
// object is now set to Level.Message, the enterMethod and
// leaveMethod calls will be ignored and not be logged.
method(); // Ignores enterMethod and leaveMethod calls.
}
}
level - The new default log levelpublic boolean isEnabled()
public void setEnabled(boolean enabled)
If you pass true to this method, all internal connections try to connect to their destination. For example, if the connections string is set to "file(filename=c:\\log.sil)", the file "c:\\log.sil" will be opened to write all following packets to it. By passing false, all internal connections will disconnect.
Additionally, every Session method evaluates if its parent is enabled and returns immediately if this is not the case. This guarantees that the performance loss is minimal when logging is disabled. A SmartInspect instance is disabled by default, so you need to enable it, before you can make use of the SmartInspect instance and its related sessions.
Please note: If one or more connections of this SmartInspect object operate in asynchronous protocol mode, you must disable this object by setting this property to false before exiting your application to properly exit and cleanup the protocol related threads. Disabling this instance may block until the related protocol threads are finished.
enabled - A boolean value to enable or disable this instancepublic void loadConnections(String fileName)
This method loads the connections string from a file. This file should be a plain text file containing a line like in the following example:
connections=file(filename=c:\\log.sil)
Empty, unrecognized lines and lines beginning with a ';' character are ignored. This version of the method enables logging automatically.
The Error event is used to notify the application if the specified file cannot be opened or does not contain a connections string. The connections string and the enabled status of this instance are not changed if such an error occurs.
The Error event is also used if a connections string could be read but is found to be invalid. In this case, an instance of the InvalidConnectionsException exception type is passed to the Error event. Calling this method with the fileName parameter set to null has no effect.
This method is useful for customizing the connections string after the deployment of an application. A typical use case for this method is the following scenario: imagine a customer who needs to send a log file to customer service to analyse a software problem. If the software in question uses this loadConnections method, the customer service just needs to send a prepared connections file to the customer. To enable the logging, the customer now just needs to drop this file to the application's installation directory or any other predefined location.
See loadConfiguration for a method which is not limited to loading the connections string, but is also capable of loading any other property of this object from a file.
The loadConnections and loadConfiguration methods are both capable of detecting the string encoding of the connections and configuration files. Please see the loadConfiguration method for details.
To automatically replace placeholders in a loaded connections string, you can use so-called connection variables. Please have a look at the setVariable method for more information.
fileName - The file to load the connections string frompublic void loadConnections(String fileName, boolean doNotEnable)
This method loads the setConnections(java.lang.String) connections string from a file.
This file should be a plain text file containing a line like in the following example:
connections=file(filename=c:\\log.sil)
Empty, unrecognized lines and lines beginning with a ';' character are ignored. This version of the method enables logging automatically unless the doNotEnable parameter is true. Please note that the doNotEnable parameter has no effect if this SmartInspect instance is already enabled.
The SmartInspectListener.onError(com.gurock.smartinspect.ErrorEvent) Error event is used to notify the application if the
specified file cannot be opened or does not contain a setConnections(java.lang.String) connections string.
The setConnections(java.lang.String) connections string and the setEnabled(boolean)
enabled status of this instance are not changed if such an error occurs.
The SmartInspectListener.onError(com.gurock.smartinspect.ErrorEvent) Error event is also used if a connections string could be read but
is found to be invalid. In this case, an instance of the InvalidConnectionsException exception
type is passed to the SmartInspectListener.onError(com.gurock.smartinspect.ErrorEvent) Error event.
Calling this method with the fileName parameter set to null has no effect.
This version of the method accepts the doNotEnable parameter. If this parameter is set to true,
the setEnabled(boolean) enabled status is not changed. Otherwise this SmartInspect
instance will be enabled. Calling this method with the fileName parameter set to null has no effect.
This method is useful for customizing the connections string after the deployment of an application. A typical use case for this method is the following scenario: imagine a customer who needs to send a log file to customer service to analyse a software problem. If the software in question uses this loadConnections method, the customer service just needs to send a prepared connections file to the customer. To enable the logging, the customer now just needs to drop this file to the application's installation directory or any other predefined location.
See loadConfiguration for a method which is not limited to loading the connections string, but is also capable of loading any other property of this object from a file.
The loadConnections and loadConfiguration methods are both capable of detecting the string encoding of the connections and configuration files. Please see the loadConfiguration method for details.
To automatically replace placeholders in a loaded connections string, you can use so called connection variables. Please have a look at the setVariable method for more information.
fileName - The file to load the connections string fromdoNotEnable - Specifies if this instance shouldn't be enabled automaticallypublic String getConnections()
public void setConnections(String connections) throws InvalidConnectionsException
You can set multiple connections by separating the connections with commas. A connection consists of a protocol identifier like "file" plus optional protocol parameters in parentheses. If you, for example, want to log to a file, the connections string must be set to "file()". You can specify the filename in the parentheses after the protocol identifier like this: "file(filename=\"c:\\mylogfile.sil\")". Note that only if this instance is enabled, the connections try to connect to their destinations immediately. By default, no connections are used.
See the Protocol class for a list of available protocols and ProtocolFactory for a way to add your own custom protocols. Furthermore have a look at the loadConnections and loadConfiguration methods, which can load a connections string from a file. Also, for a class which assists in building connections strings, please refer to the documentation of the ConnectionsBuilder class. To automatically replace placeholders in the given connections string, you can use so called connection variables. Please have a look at the setVariable method for more information.
Please note that an InvalidConnectionsException exception is thrown if an invalid connections string is supplied.
SiAuto.si.setConnections("");
SiAuto.si.setConnections("file()");
SiAuto.si.setConnections("file(filename=\"log.sil\", append=true)");
SiAuto.si.setConnections("file(append=true), tcp(host=\"localhost\")");
SiAuto.si.setConnections("file(), file(filename=\"anotherlog.sil\")");
connections - connection stringInvalidConnectionsException - if invalid syntax, unknown protocols or inexistent options are foundpublic void loadConfiguration(String fileName)
SmartInspectListener.onError event is used to notify the application if an error occurs while trying to load
the configuration from the specified file. Such errors include I/O errors like trying to open a file which does not exist, for
example.
The SmartInspectListener.onError event is also used if the specified configuration file contains an invalid
connections string. In this case, an instance of the InvalidConnectionsException exception type is passed to the
Error event.
Note:
Refer to @example for a typical configuration file format.
fileName - The name of the file to load the configuration from.ConfigurationTimer,
LoadConfigurationException,
InvalidConnectionsExceptionpublic void dispatch(String caption, int action, Object state)
This method dispatches the action and state parameters to the connection identified by the caption argument. If no suitable connection can be found, the Error event is used. The Error event is also used if an exception is thrown in the custom protocol action.
The SmartInspect Java library currently implements one custom protocol action in MemoryProtocol. The MemoryProtocol class is used for writing log packets to memory. On request, it can write its internal queue of packets to a user-supplied stream or Protocol object with a custom protocol action.
The request for executing the custom action and writing the queue can be initiated with this dispatch method. Please see the example section below for details.
For more information about custom protocol actions, please
refer to the Protocol.dispatch(com.gurock.smartinspect.protocols.ProtocolCommand) method. Also have a look at
Protocol.isValidOption() method which explains how to set
the caption of a connection.
Please note that the custom protocol action is executed asynchronously if the requested connection operates in asynchronous protocol mode.
If the supplied caption argument is null, this method does nothing and returns immediately.
// Set the connections string and enable logging. We do not
// specify a caption for the memory connection and stick with
// the default. By default, the caption of a connection is set
// to the name of the protocol, in our case 'mem'.
SiAuto.si.setConnections("mem()");
SiAuto.si.setEnabled(true);
// Instrument your application with log statements as usual.
SiAuto.main.logMessage("This is a message");
SiAuto.main.logMessage("This is a message");
// Then, in case of an unexpected event, for example, in a
// global exception handler, you can write the entire queue
// of packets of your memory protocol connection to a file
// by using the dispatch method.
OutputStream os = new FileOutputStream("log.sil");
try
{
SiAuto.si.dispatch("mem", 0, os);
}
finally
{
os.close();
}
...
// Alternative dispatch call with a Protocol object which
// sends the queue content to a local Console via a named
// pipe.
Protocol p = new PipeProtocol();
try
{
// Optionally set some protocol options
// p.initialize("");
p.connect();
try
{
SiAuto.si.dispatch("mem", 0, p);
}
finally
{
p.disconnect();
}
}
finally
{
p.dispose();
}
caption - The identifier of the connection. Not allowed to be nullaction - The action to execute by the requested connectionstate - An optional object which encapsulates additional protocol specific information about the custom action. Can be nullProtocol.dispatch(com.gurock.smartinspect.protocols.ProtocolCommand)public SessionDefaults getSessionDefaults()
public void setVariable(String key, String value)
Example:
// Define the variable "key" with the value "secret"
SiAuto.si.setVariable("key", "secret");
...
// And include the variable $key$ in the related connections
// string (the connections string can either be set directly
// or loaded from a file).
file(encrypt="true", key="$key$")
key - The key of the connection variablevalue - The value of the connection variablepublic String getVariable(String key)
key - The key of the connection variablepublic void unsetVariable(String key)
This method deletes the connection variable specified by the given key. Nothing happens if the connection variable doesn't exist or if the passed key is null.
key - The key of the connection variable to deletepublic Session addSession(String sessionName)
sessionName - The name for the new session. Not allowed to be nullpublic Session addSession(String sessionName, boolean store)
This method allocates a new session with this SmartInspect instance set as parent and the supplied sessionName parameter set as session name. The returned session will be configured with the default session properties as specified by the getSessionDefaults method. This default configuration can be overridden on a per-session basis by loading the session configuration with the loadConfiguration method. Please see the loadConfiguration documentation for details.
If the 'store' parameter is true, the created and returned session is stored for later access and can be retrieved with the getSession method. To remove a created session from the internal list, call the deleteSession method.
If this method is called multiple times with the same session name, then the getSession method operates on the session which got added last. If the sessionName parameter is null, this method does nothing and returns null as well
sessionName - The name for the new session. Not allowed to be nullstore - Indicates if the newly created session should be stored for later accesspublic void addSession(Session session)
This method adds the passed session to the internal list of sessions and saves it for later access. The passed session will be configured with the default session properties as specified by the getSessionDefaults method. This default configuration can be overridden on a per-session basis by loading the session configuration with the loadConfiguration method. Please see the loadConfiguration documentation for details.
The passed session can later be retrieved with the getSession method. To remove an added session from the internal list, call the deleteSession method.
session - The session to storepublic void deleteSession(Session session)
session - The session to remove from the lookup table of sessions. Not allowed to be null.public Session getSession(String sessionName)
This method returns a session which has previously been added with the addSession method and can be identified by the supplied sessionName argument. If the requested session is unknown or if the sessionName argument is null, this method returns null.
Note that the behavior of this method can be unexpected in terms of the result value if multiple sessions with the same name have been added. In this case, this method returns the session which got added last and not necessarily the session which you expect.
Adding multiple sessions with the same name should therefore be avoided.
sessionName - The name of the session to lookup and return. Not allowed to be nullpublic void updateSession(Session session, String to, String from)
Once the name of a session has changed, this method is called
to update the internal session lookup table. The to parameter
specifies the new name and the from name the old name of the
session. After this method returns, the new name can be passed
to the getSession method to lookup the supplied session.
session - The session whose name has changed and whose entry should be updatedto - The new name of the sessionfrom - The old name of the sessionpublic void addListener(SmartInspectListener listener)
This methods adds a new listener for the events of this SmartInspect object. This can be useful to customize the logging behavior or get informed about errors. Please see the SmartInspectListener interface for event examples and details. Also see the documentation of the SmartInspectAdapter class which simplifies the event handling.
listener - The listener to addpublic void removeListener(SmartInspectListener listener)
This method removes the supplied listener from the event system of this object. After the listener has been removed, it will no longer be notified about any events of this object.
listener - The listener to removepublic void clearListeners()
This method removes all registered event listeners. After calling this method, the previously registered listeners will no longer be notified about any events of this object.
protected boolean doFilter(Packet packet)
packet - The packet which is about to be processedprotected void doLogEntry(LogEntry logEntry)
Derived classes can override this method to intercept the
SmartInspectListener.onLogEntry(com.gurock.smartinspect.packets.logentry.LogEntryEvent).
logEntry - The Log Entry which has just been processedprotected void doControlCommand(ControlCommand controlCommand)
Derived classes can override this method to intercept the
Control Command event. SmartInspectListener.onControlCommand(com.gurock.smartinspect.packets.controlcommand.ControlCommandEvent)
controlCommand - The Control Command which has just been processedprotected void doWatch(Watch watch)
Derived classes can override this method to intercept the
Watch event.
watch - The Watch which has just been processedprotected void doError(Exception ex)
SmartInspectListener.onError(com.gurock.smartinspect.ErrorEvent)ex - The occurred exceptionprotected void doProcessFlow(ProcessFlow processFlow)
Derived classes can override this method to intercept the
Process Flow event.
processFlow - The Process Flow entry which has just been processedpublic final void sendLogEntry(LogEntry logEntry)
logEntry - The Log Entry to logpublic final void sendControlCommand(ControlCommand controlCommand)
At first, this method determines if the Control Command should really be sent by invoking the doFilter method. If the Control Command passes the filter test, it will be logged and the SmartInspectListener.onControlCommand event is fired
controlCommand - The Control Command to logpublic final void sendWatch(Watch watch)
At first, this method determines if the Watch should really be sent by invoking the doFilter method. If the Watch passes the filter test, it will be logged and the SmartInspectListener.onWatch event is fired.
watch - The Watch to logpublic final void sendProcessFlow(ProcessFlow processFlow)
processFlow - The Process Flow entry to logpublic void dispose()
This method disconnects and removes all internal connections and disables this instance. Moreover, all previously stored sessions will be removed.
Copyright © 2023. All rights reserved.