V2 Notification Sender Extension Points

Warning

This section covers the V2 extension points, which is the default for the payment notification service.
If both V1 and V2 extension points are provided, the V2 implementation is used by default.
The V1 extension points documentation can be found here.

NOTE

Any reference to ProducedReport in this documentation page refers to the V2 class com.iconsolutions.ipf.product.notification.api.model.v2.ProducedReport

Additional MDS Object Handler

Currently only PAIN.001 messages are cached by the service, this gives an extension point to cache others, and is by default a no-op.

The V2 AdditionalMdsObjectHandler is contained in the com.iconsolutions.ipf.product.notification.api.handler.v2 package.

The default implementation is provided here:

public interface AdditionalMdsObjectHandler {
    default CompletionStage<Void> handle(MdsObjectWrapper mdsObjectWrapper, ProcessingContext context) {
        return CompletableFuture.completedStage(null);
    }

    record MdsObjectWrapper(NotificationMdsObjectType mdsObjectType, String messageDefinition, String typeName, JsonNode mdsObject) {
    }
}

Which can be overridden by any client that uses the Notification Service application.

Post Event Processor

It was added as a standalone hook to run post processing for all events, regardless of whether they are configured to run.

The V2 PostEventProcessor is contained in the com.iconsolutions.ipf.product.notification.api.processor.v2 package.

The default implementation is provided here:

public interface PostEventProcessor {
    default CompletionStage<Void> handle(ProcessingContext context, ProcessFlowEvent processFlowEvent) {
        return CompletableFuture.completedStage(null);
    }
}

Which can be overridden by any client that uses the Notification Service application.

Message Log Enricher

A customised MessageLogEntryEnricher<ProducedReport> can be provided so any client can enrich MessageLogs for all SendConnector(s) from the Notification Service when sending notifications.

The default implementation of the MessageLogEntryEnricher<ProducedReport> is to do nothing and is provided here:

@Override
public void enrich(ConnectorMessage<ProducedReport> connectorMessage, MessageLogEntry messageLogEntry) {
    //noop
}

Which can be overridden by any client that uses the Notification Service application.

Send TransportMessage Converter

It was added to provide a customised SendTransportMessageConverter<ProducedReport>, so the function can be applied by all SendConnector(s) from the Notification Service when sending notifications.

The default implementation of the SendTransportMessageConverter<ProducedReport> is to serialize the ProducedReport’s report field and is provided here:

@Override
public TransportMessage convert(ProducedReport payload) {
    return new TransportMessage(SerializationHelper.objectToString(payload.report()));
}

Which can be overridden by any client that uses the Notification Service application.