Class AS4Configuration

java.lang.Object
com.helger.phase4.config.AS4Configuration

public final class AS4Configuration extends Object
This class contains the central phase4 configuration.
Note: this class should not depend on any other phase4 class to avoid startup issues, and cyclic dependencies.
Since:
0.11.0
Author:
Philip Helger
  • Field Details

    • PROPERTY_PHASE4_MANAGER_INMEMORY

      public static final String PROPERTY_PHASE4_MANAGER_INMEMORY
      The boolean property to enable in-memory managers.
      See Also:
    • DEFAULT_PHASE4_MANAGER_INMEMORY

      public static final boolean DEFAULT_PHASE4_MANAGER_INMEMORY
      See Also:
    • PROPERTY_PHASE4_WSS4J_SYNCSECURITY

      public static final String PROPERTY_PHASE4_WSS4J_SYNCSECURITY
      The boolean property to enable synchronization of sign/verify and encrypt/decrypt.
      See Also:
    • DEFAULT_PHASE4_WSS4J_SYNCSECURITY

      public static final boolean DEFAULT_PHASE4_WSS4J_SYNCSECURITY
      See Also:
    • DEFAULT_PHASE4_INCOMING_DUPLICATEDISPOSAL_MINUTES

      public static final long DEFAULT_PHASE4_INCOMING_DUPLICATEDISPOSAL_MINUTES
      See Also:
  • Method Details

    • createPhase4ValueProvider

      @Nonnull public static com.helger.config.source.MultiConfigurationValueProvider createPhase4ValueProvider()
      The configuration value provider created in here uses the default lookup scheme defined by ConfigFactory.createDefaultValueProvider() but adds support for AS4 specific files. For a sustainable solution use one of the following files that have higher precedence than application.properties:
      • private-phase4.properties - priority 204
      • phase4.properties - priority 203
      Returns:
      The configuration value provider for phase4 that contains backward compatibility support.
    • getConfig

      @Nonnull public static com.helger.config.fallback.IConfigWithFallback getConfig()
      Returns:
      The current global configuration. Never null.
    • setConfig

      @Nonnull public static com.helger.config.fallback.IConfigWithFallback setConfig(@Nonnull com.helger.config.fallback.IConfigWithFallback aNewConfig)
      Overwrite the global configuration. This is only needed for testing.
      Parameters:
      aNewConfig - The configuration to use globally. May not be null.
      Returns:
      The old value of IConfig. Never null.
    • isGlobalDebug

      public static boolean isGlobalDebug()
      Returns:
      true to enable the global debugging mode.
    • isGlobalProduction

      public static boolean isGlobalProduction()
      Returns:
      true to enable the global production mode.
    • isNoStartupInfo

      public static boolean isNoStartupInfo()
      Returns:
      true if no startup info should be logged.
    • getDataPath

      @Nonnull public static String getDataPath()
    • isUseInMemoryManagers

      public static boolean isUseInMemoryManagers()
      Returns:
      Use in-memory managers, taken from the configuration item phase4.manager.inmemory. Defaults to true since 0.11.0.
    • isWSS4JSynchronizedSecurity

      public static boolean isWSS4JSynchronizedSecurity()
      Returns:
      true if all WSS4J actions should be explicitly synchronized. This is needed if multiple workers sending/receiving AS4 messages from the same JVM. The configuration item is phase4.wss4j.syncsecurity.
    • getDefaultAS4ProfileID

      @Nullable public static String getDefaultAS4ProfileID()
      Returns:
      The AS4 profile to use, taken from the configuration item phase4.default.profile (changed in 3.0.0; was phase4.profile before). May be null.
    • getIncomingDuplicateDisposalMinutes

      public static long getIncomingDuplicateDisposalMinutes()
      Returns:
      the number of minutes, the message IDs of incoming messages are stored for duplication check. Taken from the configuration item phase4.incoming.duplicatedisposal.minutes. By default this is 10L minutes.
    • getDumpBasePath

      @Nonnull public static String getDumpBasePath()
      Returns:
      The dumping base path. Taken from the configuration item phase4.dump.path.
      See Also:
    • getDumpBasePathFile

      @Nonnull public static File getDumpBasePathFile()
      Returns:
      The dumping base path as a File. Taken from the configuration item phase4.dump.path.
      See Also:
    • getThisEndpointAddress

      @Nullable public static String getThisEndpointAddress()
      Returns:
      The endpoint address of "our" AP for comparison. Taken from the configuration item phase4.endpoint.address. For Peppol this is e.g. required to have the `https` protocol in production mode.
    • isIncludeStackTraceInErrorMessages

      public static boolean isIncludeStackTraceInErrorMessages()
      Returns:
      true if stack traces should be contained in error messages, false if not. Defaults to true.
      Since:
      2.7.5