public class

NotificationResult

extends Object
java.lang.Object
   ↳ com.urbanairship.push.notifications.NotificationResult

Summary

Nested Classes
@interface NotificationResult.Status  
Constants
int CANCEL Indicates that a Notification was not successfully created and no work should be scheduled to retry.
int OK Indicates that a Notification was successfully created.
int RETRY Indicates that a Notification was not successfully created and that a job should be scheduled to retry later.
Public Methods
static NotificationResult cancel()
Creates a new result with a CANCEL status code.
Notification getNotification()
Gets the Notification.
int getStatus()
Gets the status.
static NotificationResult notification(Notification notification)
Creates a new result with a notification and a OK status code.
static NotificationResult retry()
Creates a new result with a RETRY status code.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int CANCEL

Indicates that a Notification was not successfully created and no work should be scheduled to retry.

Constant Value: 2 (0x00000002)

public static final int OK

Indicates that a Notification was successfully created.

Constant Value: 0 (0x00000000)

public static final int RETRY

Indicates that a Notification was not successfully created and that a job should be scheduled to retry later.

Constant Value: 1 (0x00000001)

Public Methods

public static NotificationResult cancel ()

Creates a new result with a CANCEL status code.

Returns
  • An instance of NotificationFactory.Result.

public Notification getNotification ()

Gets the Notification.

Returns
  • The Notification.

public int getStatus ()

Gets the status.

Returns
  • The status.

public static NotificationResult notification (Notification notification)

Creates a new result with a notification and a OK status code.

Parameters
notification The notification.
Returns
  • An instance of NotificationFactory.Result.

public static NotificationResult retry ()

Creates a new result with a RETRY status code.

Returns
  • An instance of NotificationFactory.Result.