Interface JournalConfig

All Superinterfaces:
Config

public interface JournalConfig extends Config
Configuration for the Diffusion Journal service.

By default the journal service is not enabled. Enabling the journal will cause actions to be logged according to those selected in the journal configuration file within the selected configuration directory.

The journal can be used to log the use of various actions within the Diffusion server, but there is a processing cost so this should be used sparingly.

Since:
6.12
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Default configuration directory.
    static final String
    Default configuration file name.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the journal configuration directory.
    Returns the name of the journal configuration file.
    Returns the list specifying the session properties to be logged.
    boolean
    Indicates whether the journal service is enabled.
    void
    Sets the path of the directory holding the journal configuration file.
    void
    Sets the name of the configuration file within the indicated configuration directory.
    void
    setEnabled(boolean enabled)
    Enable or disable the journal service.
    void
    setSessionProperties(List<String> sessionProperties)
    Sets the session properties that should be logged with journal entries that relate to client sessions.

    Methods inherited from interface com.pushtechnology.diffusion.api.config.Config

    isLocked
  • Field Details

  • Method Details

    • setEnabled

      void setEnabled(boolean enabled) throws ConfigException
      Enable or disable the journal service.

      The service is disabled by default.

      Parameters:
      enabled - true to enable the journal service
      Throws:
      ConfigException - if the configuration is locked
    • isEnabled

      boolean isEnabled()
      Indicates whether the journal service is enabled.
      Returns:
      true if enabled
      See Also:
    • setConfigDirectory

      void setConfigDirectory(String directory) throws ConfigException
      Sets the path of the directory holding the journal configuration file.

      If not set, the default is DEFAULT_CONFIG_DIRECTORY.

      If the path is relative, it is evaluated relative to the Diffusion installation directory.

      Parameters:
      directory - the journal configuration directory
      Throws:
      ConfigException - if unable to set the directory
    • getConfigDirectory

      String getConfigDirectory()
      Gets the journal configuration directory.
      Returns:
      journal configuration directory
    • setConfigFile

      void setConfigFile(String fileName) throws ConfigException
      Sets the name of the configuration file within the indicated configuration directory. If not the default is DEFAULT_CONFIG_FILE.
      Parameters:
      fileName - the name of the journal configuration file
      Throws:
      ConfigException - if unable to set the file name
    • getConfigFile

      String getConfigFile()
      Returns the name of the journal configuration file.
      Returns:
      the journal configuration file name.
    • setSessionProperties

      void setSessionProperties(List<String> sessionProperties) throws ConfigException
      Sets the session properties that should be logged with journal entries that relate to client sessions.

      If not set the default is a list with the single entry of "$none", meaning no session properties are logged.

      A single entry of "$all" may be specified to log all session properties.

      A value of "$user" or "*U" may be used to specify all user session properties.

      A value of $fixed" or "*F" may be used to indicates all fixed session properties.

      If the first element of the list is "$not" then all session properties except those that follow will be logged.

      Parameters:
      sessionProperties - the list specifying the session properties to be logged
      Throws:
      ConfigException - if unable to set the session properties list
    • getSessionProperties

      List<String> getSessionProperties()
      Returns the list specifying the session properties to be logged.
      Returns:
      list specifying the session properties to be logged