Package com.helger.phase4.incoming.spi
Interface IAS4IncomingMessageProcessorSPI
@IsSPIInterface
public interface IAS4IncomingMessageProcessorSPI
Implement this SPI interface to handle incoming messages appropriate.
Name before v3:
Name before v3:
com.helger.phase4.servlet.IAS4ServletMessageProcessorSPI- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidprocessAS4ResponseMessage(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull IAS4IncomingMessageState aIncomingState, @NonNull @Nonempty String sResponseMessageID, byte @Nullable [] aResponseBytes, boolean bResponsePayloadIsAvailable, @NonNull AS4ErrorList aEbmsErrorMessages) Optional callback to process a response message@NonNull AS4SignalMessageProcessorResultprocessAS4SignalMessage(@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.@NonNull AS4MessageProcessorResultprocessAS4UserMessage(@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
-
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. 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.aIncomingState- 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 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. 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.aIncomingState- 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
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. Nevernull.aIncomingState- 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.aEbmsErrorMessages- The error messages collected while processing the message. Nevernullbut maybe empty for positive responses. Since v4.3.0.
-