2.9.1 (latest) 2.9.0 2.8.1 2.7.2 2.6.0 2.5.1 2.4.1 2.1.2 2.0.1 1.35.2 1.34.1 1.33.4

    public interface UnparsedNotificationCallback extends Serializable

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;

       {@literal @}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;
         }
       }
     }
     
## Implements

[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html)

## Methods

### onNotification(StoredChannel storedChannel, UnparsedNotification notification)

    public abstract void onNotification(StoredChannel storedChannel, UnparsedNotification notification)

Handles a received unparsed notification.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `storedChannel` | `https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.notifications.StoredChannel` stored notification channel |
| `notification` | `https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.notifications.UnparsedNotification` unparsed notification |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |