Package com.helger.phase4.servlet.spi
Interface IAS4ServletMessageProcessorSPI
@IsSPIInterface
public interface IAS4ServletMessageProcessorSPI
Implement this SPI interface to handle incoming messages appropriate.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidprocessAS4ResponseMessage(IAS4IncomingMessageMetadata aMessageMetadata, IAS4MessageState aState, String sResponseMessageID, byte[] aResponseBytes, boolean bResponsePayloadIsAvailable) Optional callback to process a response messageprocessAS4SignalMessage(IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaders, Ebms3SignalMessage aSignalMessage, IPMode aPMode, IAS4MessageState aState, com.helger.commons.collection.impl.ICommonsList<Ebms3Error> 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.processAS4UserMessage(IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaders, Ebms3UserMessage aUserMessage, IPMode aPMode, Node aPayload, com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aIncomingAttachments, IAS4MessageState aState, com.helger.commons.collection.impl.ICommonsList<Ebms3Error> aProcessingErrorMessages) Process incoming AS4 user message
-
Method Details
-
processAS4UserMessage
@Nonnull AS4MessageProcessorResult processAS4UserMessage(@Nonnull IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHttpHeaders, @Nonnull Ebms3UserMessage aUserMessage, @Nonnull IPMode aPMode, @Nullable Node aPayload, @Nullable com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aIncomingAttachments, @Nonnull IAS4MessageState aState, @Nonnull com.helger.commons.collection.impl.ICommonsList<Ebms3Error> aProcessingErrorMessages) Process incoming AS4 user message- Parameters:
aMessageMetadata- Message metadata. Nevernull. Since v0.9.8.aHttpHeaders- The original HTTP headers. Nevernull.aUserMessage- The received user message. May not benull.aPMode- The source PMode used to parse the message.aPayload- Extracted, decrypted and verified payload node (e.g. SBDH). May benull. May also benullif 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 benullor empty if no attachments are present.aState- The current message state. Can be used to determine all other things potentially necessary for processing the incoming message. Nevernull.aProcessingErrorMessages- List for error messages that occur during processing. Nevernull.- Returns:
- A non-
nullresult 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 aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHttpHeaders, @Nonnull Ebms3SignalMessage aSignalMessage, @Nullable IPMode aPMode, @Nonnull IAS4MessageState aState, @Nonnull com.helger.commons.collection.impl.ICommonsList<Ebms3Error> 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:
aMessageMetadata- Request metadata. Nevernull. Since v0.9.8.aHttpHeaders- The original HTTP headers. Nevernull.aSignalMessage- The received signal message. May not benull.aPMode- PMode - only needed for pull-request. May benull.aState- The current message state. Can be used to determine all other things potentially necessary for processing the incoming message. Nevernull.aProcessingErrorMessages- List for error messages that occur during processing. Nevernull.- Returns:
- A non-
nullresult object. If a failure is returned, the message of the failure object itself is returned as an EBMS_OTHER error.
-
processAS4ResponseMessage
default void processAS4ResponseMessage(@Nonnull IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull IAS4MessageState aState, @Nonnull @Nonempty String sResponseMessageID, @Nullable byte[] aResponseBytes, boolean bResponsePayloadIsAvailable) Optional callback to process a response message- Parameters:
aMessageMetadata- Incoming message metadata. Nevernull.aState- The current message state. Can be used to determine all other things potentially necessary for processing the response message. Nevernull.sResponseMessageID- The AS4 message ID of the response. Neithernullnor empty. Since v1.2.0.aResponseBytes- The response bytes to be written. May benullfor several reasons.bResponsePayloadIsAvailable- This indicates if a response payload is available at all. If this isfalsethan the response bytes arenull. Special case: if this istrueand response bytes isnullthan most likely the response entity is not repeatable and cannot be handled more than once - that's why it isnullhere in this callback, but non-nullin the originally returned message.- Since:
- v0.9.8
-