com.helger.phase4.model.pmodeMaven artifact:
com.helger.phase4:phase4-lib
A P-Mode (Processing Mode) governs the AS4 message exchange behavior including party identifiers, agreement references, MEP, security settings, and retry parameters.
IPMode
Read-only interface for a P-Mode. All read access to P-Mode data goes through this interface.Interface methods
The unique P-Mode identifier. Never
null nor empty.The party initiating the message exchange. May be
null.Convenience method returning
type:value or just value. May be null.The responding party. May be
null.Convenience method returning the responder’s combined ID. May be
null.The agreement reference URI. May be
null.The Message Exchange Pattern (One-Way, Two-Way). Never
null.The MEP binding (Push, Pull, Sync, etc.). Never
null.The first leg configuration (protocol, business info, error handling, security). May be
null.The second leg configuration. May be
null.Optional payload service (e.g. GZip compression). May be
null.Optional reception awareness settings (retries, duplicate elimination). May be
null.Serialize the PMode to JSON. Never
null. Since 0.12.0.PMode
Default mutable implementation ofIPMode.
Constructor
Mutator methods
All mutators returnEChange indicating whether the value actually changed.
PModeParty
Represents a single party within a PMode (initiator or responder).Constructor
Factory method
Fields
Optional party ID type/scheme. May be
null.Mandatory party ID value. Never
null nor empty.Combined ID:
type:value when type is present, otherwise just value.The party role URI. Never
null nor empty.WS-Security UsernameToken user name. May be
null.WS-Security UsernameToken password in plain text. May be
null.PModeReceptionAwareness
Controls retry behavior and duplicate message elimination for a P-Mode. Key fields (accessed via getters/setters onPModeReceptionAwareness):
| Field | Type | Description |
|---|---|---|
ReceptionAwareness | boolean | Whether reception awareness is active |
RetryAttempts | int | Number of retry attempts |
RetryIntervalMS | long | Retry interval in milliseconds |
DuplicateElimination | boolean | Whether duplicate messages should be eliminated |
P-Mode Managers
phase4 provides two built-inIPModeManager implementations, selected via AS4Configuration.isUseInMemoryManagers().
PModeManagerInMemory
PModeManagerInMemory
All P-Modes are held in memory only. Created automatically when
phase4.manager.inmemory=true (the default).PModeManagerXML
PModeManagerXML
P-Modes are persisted to XML files under
AS4Configuration.getDataPath(). Used when phase4.manager.inmemory=false.No code changes are required — the manager is swapped transparently at startup.