Beta
Callback to receive unparsed notifications for watched resource.
Must NOT be implemented in form of an anonymous class since this would break serialization.
Should be thread-safe as several notifications might be processed at the same time.
Example usage:
static class MyNotificationCallback implements UnparsedNotificationCallback {
private static final long serialVersionUID = 1L;
@Override
public void onNotification(StoredChannel storedChannel, UnparsedNotification notification) {
String contentType = notification.getContentType();
InputStream contentStream = notification.getContentStream();
switch (notification.getResourceState()) {
case ResourceStates.SYNC:
break;
case ResourceStates.EXISTS:
break;
case ResourceStates.NOT_EXISTS:
break;
}
}
}