Interface IPhase4PeppolIncomingSBDHandlerSPI


@IsSPIInterface public interface IPhase4PeppolIncomingSBDHandlerSPI
This is the interface that must be implemented to handle incoming SBD documents.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleIncomingSBD(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHeaders, @NonNull com.helger.phase4.ebms3header.Ebms3UserMessage aUserMessage, byte @NonNull [] aSBDBytes, @NonNull org.unece.cefact.namespaces.sbdh.StandardBusinessDocument aSBD, @NonNull com.helger.peppol.sbdh.PeppolSBDHData aPeppolSBD, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aState, @NonNull com.helger.phase4.error.AS4ErrorList aProcessingErrorMessages)
    Handle the provided incoming StandardBusinessDocument
    void
    processAS4ResponseMessage(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aIncomingState, @NonNull @Nonempty String sResponseMessageID, byte @Nullable [] aResponseBytes, boolean bResponsePayloadIsAvailable, @NonNull com.helger.phase4.error.AS4ErrorList aEbmsErrorMessages)
    Optional callback to process a response message
  • Method Details

    • handleIncomingSBD

      void handleIncomingSBD(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHeaders, @NonNull com.helger.phase4.ebms3header.Ebms3UserMessage aUserMessage, byte @NonNull [] aSBDBytes, @NonNull org.unece.cefact.namespaces.sbdh.StandardBusinessDocument aSBD, @NonNull com.helger.peppol.sbdh.PeppolSBDHData aPeppolSBD, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aState, @NonNull com.helger.phase4.error.AS4ErrorList aProcessingErrorMessages) throws Exception
      Handle the provided incoming StandardBusinessDocument
      Parameters:
      aMessageMetadata - Message metadata. Includes data when and from whom it was received. Never null. Since v0.9.8.
      aHeaders - The (HTTP) headers of the incoming request. Never null.
      aUserMessage - The received EBMS user message. Never null. Since v0.9.8.
      aSBDBytes - The raw SBD bytes. These are the bytes as received via AS4, just decrypted and decompressed. Never null.
      aSBD - The incoming parsed Standard Business Document as JAXB data model. This is the pre-parsed SBD bytes. Use SBDMarshaller to serialize the document. Never null
      aPeppolSBD - The pre-parsed Peppol Standard Business Document. Never null. Since v0.9.8.
      aState - The message state. Can e.g. be used to retrieve information about the certificate found in the message. Never null. Since v0.9.8
      aProcessingErrorMessages - List for error messages that occur during processing. Never null. Since v2.6.0.
      Throws:
      Exception - In case it cannot be processed.
    • processAS4ResponseMessage

      void processAS4ResponseMessage(@NonNull com.helger.phase4.incoming.IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.phase4.incoming.IAS4IncomingMessageState aIncomingState, @Nonempty @NonNull @Nonempty String sResponseMessageID, byte @Nullable [] aResponseBytes, boolean bResponsePayloadIsAvailable, @NonNull com.helger.phase4.error.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.