Class AS4Profile

java.lang.Object
com.helger.phase4.profile.AS4Profile
All Implemented Interfaces:
com.helger.commons.id.IHasID<String>, com.helger.commons.name.IHasDisplayName, IAS4Profile

@Immutable public class AS4Profile extends Object implements IAS4Profile
Default implementation of IAS4Profile.
Author:
Philip Helger
  • Constructor Details

    • AS4Profile

      public AS4Profile(@Nonnull @Nonempty String sID, @Nonnull @Nonempty String sDisplayName, @Nonnull Supplier<? extends IAS4ProfileValidator> aProfileValidatorProvider, @Nonnull IAS4ProfilePModeProvider aDefaultPModeProvider, @Nonnull IPModeIDProvider aPModeIDProvider, boolean bDeprecated, boolean bInvokeSPIForPingMessage)
      Constructor
      Parameters:
      sID - Profile ID. May neither be null nor empty.
      sDisplayName - Profile display name. May neither be null nor empty.
      aProfileValidatorProvider - Profile validator supplier. May not be null. The supplier may supply null values.
      aDefaultPModeProvider - Default PMode supplier. May not be null.
      aPModeIDProvider - PMode ID provider. May not be null.
      bDeprecated - true if the profile is deprecated, false if not.
      bInvokeSPIForPingMessage - true to invoke the custom SPI handler for received
  • Method Details

    • getID

      @Nonnull @Nonempty public String getID()
      Specified by:
      getID in interface com.helger.commons.id.IHasID<String>
    • getDisplayName

      @Nonnull @Nonempty public String getDisplayName()
      Specified by:
      getDisplayName in interface com.helger.commons.name.IHasDisplayName
    • getValidator

      @Nullable public IAS4ProfileValidator getValidator()
      Specified by:
      getValidator in interface IAS4Profile
      Returns:
      An optional validator. May be null.
    • createPModeTemplate

      @Nonnull public PMode createPModeTemplate(@Nonnull @Nonempty String sInitiatorID, @Nonnull @Nonempty String sResponderID, @Nullable String sAddress)
      Description copied from interface: IAS4Profile
      Create a PMode for the provided parameters.
      Specified by:
      createPModeTemplate in interface IAS4Profile
      Parameters:
      sInitiatorID - Initiator ID
      sResponderID - Responder ID
      sAddress - Address string
      Returns:
      A PMode that is NOT yet in the manager and is not complete! The following information is most likely not contained: URLs, certificates.
    • getPModeIDProvider

      @Nonnull public IPModeIDProvider getPModeIDProvider()
      Specified by:
      getPModeIDProvider in interface IAS4Profile
      Returns:
      The PMode ID provider to be used for this profile. May not be null.
    • isDeprecated

      public boolean isDeprecated()
      Specified by:
      isDeprecated in interface IAS4Profile
      Returns:
      true if this AS4 profile is deprecated and should therefore not be used, or false if not.
    • isInvokeSPIForPingMessage

      public boolean isInvokeSPIForPingMessage()
      Specified by:
      isInvokeSPIForPingMessage in interface IAS4Profile
      Returns:
      true if this profile wants to handle Ping messages inside the custom SPI handler. This was introduced for sole usage in BDEW profile.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object