Package com.helger.phase4.config
Class AS4Configuration
java.lang.Object
com.helger.phase4.config.AS4Configuration
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.
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic com.helger.config.source.MultiConfigurationValueProviderThe configuration value provider created in here uses the default lookup scheme defined byConfigFactory.createDefaultValueProvider()but adds support for AS4 specific files.static com.helger.config.fallback.IConfigWithFallbackstatic Stringstatic Stringstatic Stringstatic Filestatic longstatic Stringstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic com.helger.config.fallback.IConfigWithFallbacksetConfig(com.helger.config.fallback.IConfigWithFallback aNewConfig) Overwrite the global configuration.
-
Field Details
-
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
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 byConfigFactory.createDefaultValueProvider()but adds support for AS4 specific files. For a sustainable solution use one of the following files that have higher precedence thanapplication.properties:- private-phase4.properties - priority 204
- phase4.properties - priority 203
- Returns:
- The configuration value provider for phase4 that contains backward compatibility support.
-
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 benull.- Returns:
- The old value of
IConfig. Nevernull.
-
isGlobalDebug
public static boolean isGlobalDebug()- Returns:
trueto enable the global debugging mode.
-
isGlobalProduction
public static boolean isGlobalProduction()- Returns:
trueto enable the global production mode.
-
isNoStartupInfo
public static boolean isNoStartupInfo()- Returns:
trueif no startup info should be logged.
-
getDataPath
-
isUseInMemoryManagers
public static boolean isUseInMemoryManagers()- Returns:
- Use in-memory managers, taken from the configuration item
phase4.manager.inmemory. Defaults totruesince 0.11.0.
-
isWSS4JSynchronizedSecurity
public static boolean isWSS4JSynchronizedSecurity()- Returns:
trueif all WSS4J actions should be explicitly synchronized. This is needed if multiple workers sending/receiving AS4 messages from the same JVM. The configuration item isphase4.wss4j.syncsecurity.
-
getDefaultAS4ProfileID
- Returns:
- The AS4 profile to use, taken from the configuration item
phase4.default.profile(changed in 3.0.0; wasphase4.profilebefore). May benull.
-
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
- Returns:
- The dumping base path. Taken from the configuration item
phase4.dump.path. - See Also:
-
getDumpBasePathFile
- Returns:
- The dumping base path as a
File. Taken from the configuration itemphase4.dump.path. - See Also:
-
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:
trueif stack traces should be contained in error messages,falseif not. Defaults totrue.- Since:
- 2.7.5
-