Interface IAS4IncomingMessageProcessorSPI


@IsSPIInterface public interface IAS4IncomingMessageProcessorSPI
Implement this SPI interface to handle incoming messages appropriate.
Name before v3: com.helger.phase4.servlet.IAS4ServletMessageProcessorSPI
Author:
Philip Helger
  • Method Details

    • processAS4UserMessage

      @NonNull AS4MessageProcessorResult processAS4UserMessage(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHttpHeaders, @NonNull Ebms3UserMessage aUserMessage, @NonNull IPMode aPMode, @Nullable Node aPayload, @Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> aIncomingAttachments, @NonNull IAS4IncomingMessageState aIncomingState, @NonNull AS4ErrorList aProcessingErrorMessages)
      Process incoming AS4 user message
      Parameters:
      aIncomingMessageMetadata - Message metadata. Never null. Since v0.9.8.
      aHttpHeaders - The original HTTP headers. Never null.
      aUserMessage - The received user message. May not be null.
      aPMode - The source PMode used to parse the message.
      aPayload - Extracted, decrypted and verified payload node (e.g. SBDH). May be null. May also be null if a MIME message comes in - in that case the SOAP body MUST be empty and the main payload can be found in aIncomingAttachments[0].
      aIncomingAttachments - Extracted, decrypted and verified attachments. May be null or empty if no attachments are present.
      aIncomingState - The current message state. Can be used to determine all other things potentially necessary for processing the incoming message. Never null.
      aProcessingErrorMessages - List for error messages that occur during processing. Never null.
      Returns:
      A non-null result object. If a failure is returned, the message of the failure object itself is returned as an EBMS_OTHER error.
    • processAS4SignalMessage

      @NonNull AS4SignalMessageProcessorResult processAS4SignalMessage(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHttpHeaders, @NonNull Ebms3SignalMessage aSignalMessage, @Nullable IPMode aPMode, @NonNull IAS4IncomingMessageState aIncomingState, @NonNull AS4ErrorList aProcessingErrorMessages)
      Process incoming AS4 signal message - pull-request and receipt.
      Attachment and Payload are not needed since they are allowed, but should not be added to a SignalMessage Because the will be ignored in the MSH - Processing.
      Parameters:
      aIncomingMessageMetadata - Request metadata. Never null. Since v0.9.8.
      aHttpHeaders - The original HTTP headers. Never null.
      aSignalMessage - The received signal message. May not be null.
      aPMode - PMode - only needed for pull-request. May be null.
      aIncomingState - The current message state. Can be used to determine all other things potentially necessary for processing the incoming message. Never null.
      aProcessingErrorMessages - List for error messages that occur during processing. Never null.
      Returns:
      A non-null result object. If a failure is returned, the message of the failure object itself is returned as an EBMS_OTHER error.
    • processAS4ResponseMessage

      void processAS4ResponseMessage(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull IAS4IncomingMessageState aIncomingState, @Nonempty @NonNull @Nonempty String sResponseMessageID, byte @Nullable [] aResponseBytes, boolean bResponsePayloadIsAvailable, @NonNull AS4ErrorList aEbmsErrorMessages)
      Optional callback to process a response message
      Parameters:
      aIncomingMessageMetadata - Incoming message metadata. Never null.
      aIncomingState - The current message state. Can be used to determine all other things potentially necessary for processing the response message. Never null.
      sResponseMessageID - The AS4 message ID of the response. Neither null nor empty. Since v1.2.0.
      aResponseBytes - The response bytes to be written. May be null for several reasons.
      bResponsePayloadIsAvailable - This indicates if a response payload is available at all. If this is false than the response bytes are null. Special case: if this is true and response bytes is null than most likely the response entity is not repeatable and cannot be handled more than once - that's why it is null here in this callback, but non-null in the originally returned message.
      aEbmsErrorMessages - The error messages collected while processing the message. Never null but maybe empty for positive responses. Since v4.3.0.