Interface DiagnosticsConfiguration
-
public interface DiagnosticsConfiguration
This interface represents the Intelligence Server Diagnostics Configuration. A Diagnostics Configuration consists of a number ofDiagnosticsLogger
s. Each such diagnostics logger logs messages usingDiagnosticsDispatcher
s. Further each dispatcher can be configured to write to multiple log destinations. An Intelligence Server has a default diagnostics configuration. Also each Server Instance has its own diagnostics configuration. This interface can represent both default and (server) instance configuration. Also, an instance configuration can be configured to use the default configuration. Further, the Diagnostics loggers for the configuration can be queried and configured using this interface. Any configuration changes made need to be saved usingsave(boolean)
methods to ensure that they are saved and applied.- Since:
- MicroStrategy Web 7.5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SimpleList
getDestinations(java.lang.String logger, java.lang.String dispatcher)
Returns a Simple List ofLogDestination
objects for a given logger-dispatcher combination.DiagnosticsLoggers
getLoggers()
Returns theDiagnosticsLoggers
for this configuration.boolean
getUseDefault()
Conveys whether this diagnostics configuration has been configured to use the default configuration for the IServer.boolean
isDefault()
Conveys if this configuration represents the default diagnostics configuration for the IServer.void
refreshServerConfiguration()
Refreshes the server's diagnostics configuration.void
save()
Saves any changes done to the configuration since the last update (or save).void
save(boolean applyRuntime)
Saves any changes done to the configuration since the last update (or save).void
setUseDefault(boolean useDefault)
Configures the owner server instance to use the default diagnostics configuration of the IServer or not.
-
-
-
Method Detail
-
getLoggers
DiagnosticsLoggers getLoggers()
Returns theDiagnosticsLoggers
for this configuration.- Returns:
- DiagnosticsLoggers the diagnostics for this configuration.
-
getDestinations
SimpleList getDestinations(java.lang.String logger, java.lang.String dispatcher) throws ServerConfigException
Returns a Simple List ofLogDestination
objects for a given logger-dispatcher combination.- Parameters:
logger
- TheDiagnosticsLogger
object.dispatcher
- TheDiagnosticsDispatcher
object- Returns:
- SimpleList list of log destinations.
- Throws:
ServerConfigException
- if an error was encountered while querying the log destinations.
-
getUseDefault
boolean getUseDefault()
Conveys whether this diagnostics configuration has been configured to use the default configuration for the IServer. This method is normally applicable to diagnostics configuration of a Server Instance only, as they can be configured to use the default configuration of the IServer rather than their own configuration. If this diagnostics configuration represents a default configuration itself, this method will return True.- Returns:
- boolean
-
setUseDefault
void setUseDefault(boolean useDefault)
Configures the owner server instance to use the default diagnostics configuration of the IServer or not. If useDefault is set to True, the server instance will use the default configuration (instead of its own configuration) else it will use its own configuration. Changes made should be saved usingsave(boolean)
. Note that this method is relevant only if this configuration represents the configuration for an individual server instance. if this configuration represents a default configuration, setting useDefault to True represents a no-operation. Since a default configuration will always continue to use only its configuration, setting useDefault to False on it, will however, result in Error.- Parameters:
useDefault
- if this configuration should use the default configuration for the IServer.- Throws:
java.lang.UnsupportedOperationException
- if [1] this configuration represents a default configuration and [2] an attempt is made to configure it to not use the default configuration (i.e. useDefault is passed as False).
-
isDefault
boolean isDefault()
Conveys if this configuration represents the default diagnostics configuration for the IServer.- Returns:
- boolean True if this configuration represents the default diagnostics configuration for the IServer. If not (i.e. this configuration corresponds to an individual server instance on the IServer), False is returned.
-
save
void save(boolean applyRuntime) throws ServerConfigException
Saves any changes done to the configuration since the last update (or save). If applyRuntime is set to false, the saved changes will be effected on IServer only upon subsequent restart. If set to True, the changes will however be applied on IServer immediately.- Parameters:
applyRuntime
- if True, asks IServer to apply the saved changes to configuration immediately. If this configuration represents a default configuration, and this is set to True, all server instances using the default diagnostics configuration will thus, start using the new changes immediately upon save.- Throws:
ServerConfigException
- If an error was encountered while saving the changes.
-
save
void save() throws ServerConfigException
Saves any changes done to the configuration since the last update (or save). The saved changes will be effected on IServer only upon subsequent restart.- Throws:
ServerConfigException
- If an error was encountered while saving the changes.
-
refreshServerConfiguration
void refreshServerConfiguration() throws ServerConfigException
Refreshes the server's diagnostics configuration. The server will re-read the diagnostics configuration from storage and load that configuration into the running Intelligence Server instance.- Throws:
ServerConfigException
- Thrown if an error occurs.- Since:
- MicroStrategy Web 8.0.1
-
-