handle
This interface is designed for implementing custom handlers that respond to DataSync realtime events. It defines a single handle method that is called with a PNDataSyncEventResult instance, which contains the DataSync create/update/delete event.
A single subscribed ref-channel delivers a mix of DataSync leaf types, so branch on the sealed getExtractedMessage.
Usage example:
OnDataSyncHandler handler = pnDataSyncEventResult -> {
System.out.println("Received DataSync event: " + pnDataSyncEventResult.getExtractedMessage());
};
Content copied to clipboard
See also
for more information about the result provided to this handler.