Package com.helger.phase4.springboot.spi
Class CustomPeppolIncomingViaInterfaceSPI
java.lang.Object
com.helger.phase4.springboot.spi.CustomPeppolIncomingViaInterfaceSPI
- All Implemented Interfaces:
com.helger.phase4.peppol.servlet.IPhase4PeppolIncomingSBDHandlerSPI
@IsSPIImplementation
public class CustomPeppolIncomingViaInterfaceSPI
extends Object
implements com.helger.phase4.peppol.servlet.IPhase4PeppolIncomingSBDHandlerSPI
This is one way of handling incoming messages: have an interface
Based on https://github.com/phax/phase4/discussions/115
CustomPeppolIncomingViaInterfaceSPI.IPeppolIncomingHandler that mimics the parameters of the
IPhase4PeppolIncomingSBDHandlerSPI handling method. Use a static
member of this class to set it. Each invocation of the SPI triggers a call to
the registered handler.Based on https://github.com/phax/phase4/discussions/115
- Author:
- Philip Helger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidhandleIncomingSBD(com.helger.phase4.messaging.IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHeaders, com.helger.phase4.ebms3header.Ebms3UserMessage aUserMessage, byte[] aSBDBytes, org.unece.cefact.namespaces.sbdh.StandardBusinessDocument aSBD, com.helger.peppol.sbdh.PeppolSBDHDocument aPeppolSBD, com.helger.phase4.servlet.IAS4MessageState aState) static voidCall this method once on application startup.
-
Constructor Details
-
CustomPeppolIncomingViaInterfaceSPI
public CustomPeppolIncomingViaInterfaceSPI()
-
-
Method Details
-
getIncomingHandler
@Nullable public static CustomPeppolIncomingViaInterfaceSPI.IPeppolIncomingHandler getIncomingHandler()- Returns:
- The statically defined incoming handler. May be
null. Isnullby default.
-
setIncomingHandler
public static void setIncomingHandler(@Nullable CustomPeppolIncomingViaInterfaceSPI.IPeppolIncomingHandler aHandler) Call this method once on application startup. Should only be called once.- Parameters:
aHandler- The handler to be used. May benullbut makes no sense.
-
handleIncomingSBD
public void handleIncomingSBD(@Nonnull com.helger.phase4.messaging.IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHeaders, @Nonnull com.helger.phase4.ebms3header.Ebms3UserMessage aUserMessage, @Nonnull byte[] aSBDBytes, @Nonnull org.unece.cefact.namespaces.sbdh.StandardBusinessDocument aSBD, @Nonnull com.helger.peppol.sbdh.PeppolSBDHDocument aPeppolSBD, @Nonnull com.helger.phase4.servlet.IAS4MessageState aState) throws Exception - Specified by:
handleIncomingSBDin interfacecom.helger.phase4.peppol.servlet.IPhase4PeppolIncomingSBDHandlerSPI- Throws:
Exception
-
exceptionTranslatesToAS4Error
public boolean exceptionTranslatesToAS4Error()- Specified by:
exceptionTranslatesToAS4Errorin interfacecom.helger.phase4.peppol.servlet.IPhase4PeppolIncomingSBDHandlerSPI
-