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
FieldsModifier and TypeFieldDescriptionstatic final Durationstatic final longDeprecated, for removal: This API element is subject to removal in a future version.static final booleanstatic final booleanstatic final StringThe duration property for the incoming message duplicate disposal time.static final StringThe legacy property for the incoming message duplicate disposal time, expressed in minutes.static final StringThe boolean property to enable in-memory managers.static final StringThe boolean property to enable synchronization of sign/verify and encrypt/decrypt. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull com.helger.config.source.MultiConfigurationValueProviderDeprecated, for removal: This API element is subject to removal in a future version.static @NonNull com.helger.config.fallback.IConfigWithFallbackstatic @NonNull Stringstatic @Nullable Stringstatic @NonNull Stringstatic @NonNull Filestatic @NonNull Durationstatic longDeprecated, for removal: This API element is subject to removal in a future version.UsegetIncomingDuplicateDisposal()instead.static @Nullable Stringstatic booleanCheck if special Domibus compatibility is needed or not.static booleanstatic booleanstatic booleanCheck if all HTTP response status codes should be handled by phase4.static booleanstatic booleanstatic booleanstatic booleanstatic @NonNull com.helger.config.fallback.IConfigWithFallbacksetConfig(@NonNull 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:
-
PROPERTY_PHASE4_INCOMING_DUPLICATEDISPOSAL
The duration property for the incoming message duplicate disposal time. Supports the unit-less form (e.g.10m,1h 30m) since v4.5.0.- See Also:
-
PROPERTY_PHASE4_INCOMING_DUPLICATEDISPOSAL_MINUTES
The legacy property for the incoming message duplicate disposal time, expressed in minutes. UsePROPERTY_PHASE4_INCOMING_DUPLICATEDISPOSALwith the unit-less form instead.- See Also:
-
DEFAULT_PHASE4_INCOMING_DUPLICATEDISPOSAL_MINUTES
@Deprecated(forRemoval=true, since="4.5.0") public static final long DEFAULT_PHASE4_INCOMING_DUPLICATEDISPOSAL_MINUTESDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
DEFAULT_PHASE4_INCOMING_DUPLICATEDISPOSAL_DURATION
-
-
Method Details
-
createPhase4ValueProvider
@Deprecated(forRemoval=true, since="4.0.1") public static @NonNull com.helger.config.source.MultiConfigurationValueProvider createPhase4ValueProvider()Deprecated, for removal: This API element is subject to removal in a future version.UseConfigFactory.createDefaultValueProvider()insteadThe 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
This is deprecated since v4.0.1 because it creates confusion with other objects that also rely on a centralized configuration. Put all your properties in
application.propertiesorprivate-application.propertiesinstead.- Returns:
- The configuration value provider for phase4 that contains backward compatibility support.
-
getConfig
public static @NonNull com.helger.config.fallback.IConfigWithFallback getConfig()- Returns:
- The current global configuration. Never
null.
-
setConfig
public static @NonNull 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.
-
getIncomingDuplicateDisposal
- Returns:
- the duration the message IDs of incoming messages are stored for duplication check.
Taken from the configuration item "phase4.incoming.duplicatedisposal"
(using the unit-less form like
10mor1h 30m) with fallback to the legacy item "phase4.incoming.duplicatedisposal.minutes" (a plain number of minutes). By default this is 10L minutes. Nevernull. - Since:
- 4.5.0
-
getIncomingDuplicateDisposalMinutes
@Deprecated(forRemoval=true, since="4.5.0") public static long getIncomingDuplicateDisposalMinutes()Deprecated, for removal: This API element is subject to removal in a future version.UsegetIncomingDuplicateDisposal()instead.- Returns:
- the number of minutes, the message IDs of incoming messages are stored for duplication check. 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
-
isCompatibilityModeDomibus
public static boolean isCompatibilityModeDomibus()Check if special Domibus compatibility is needed or not. This is e.g. needed in environments where there are multiple Domibus nodes.- Returns:
trueif advanced Domibus compatibility is needed,falseif not.- Since:
- 4.0.1
-
isHttpResponseAcceptAllStatusCodes
public static boolean isHttpResponseAcceptAllStatusCodes()Check if all HTTP response status codes should be handled by phase4. Up to and including phase4 4.1.0 only HTTP status codes < 300 were accepted. By setting this configuration property tofalsethis behaviour is recreated.- Returns:
trueif all HTTP status codes should be accepted,falseif not.- Since:
- 4.1.1
-
ConfigFactory.createDefaultValueProvider()instead