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(IAS4IncomingMessageMetadata aIncomingMessageMetadata, IAS4IncomingMessageState aIncomingState, String sResponseMessageID, byte[] aResponseBytes, boolean bResponsePayloadIsAvailable) Optional callback to process a response messageprocessAS4SignalMessage(IAS4IncomingMessageMetadata aIncomingMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaders, Ebms3SignalMessage aSignalMessage, IPMode aPMode, IAS4IncomingMessageState aIncomingState, 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 aIncomingMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaders, Ebms3UserMessage aUserMessage, IPMode aPMode, Node aPayload, com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aIncomingAttachments, IAS4IncomingMessageState aIncomingState, com.helger.commons.collection.impl.ICommonsList<Ebms3Error> aProcessingErrorMessages) Process incoming AS4 user message
-
Method Details
-
processAS4UserMessage
@Nonnull AS4MessageProcessorResult processAS4UserMessage(@Nonnull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @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 IAS4IncomingMessageState aIncomingState, @Nonnull com.helger.commons.collection.impl.ICommonsList<Ebms3Error> 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.commons.http.HttpHeaderMap aHttpHeaders, @Nonnull Ebms3SignalMessage aSignalMessage, @Nullable IPMode aPMode, @Nonnull IAS4IncomingMessageState aIncomingState, @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:
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, @Nonnull @Nonempty String sResponseMessageID, @Nullable byte[] aResponseBytes, boolean bResponsePayloadIsAvailable) 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.- Since:
- v0.9.8
-