public static class

NotificationFactory.Result

extends Object
java.lang.Object
   ↳ com.urbanairship.push.notifications.NotificationFactory.Result

Class Overview

A container for a NotificationFactory result, containing a nullable Notification instance and a status code.

Summary

Nested Classes
@interface NotificationFactory.Result.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 NotificationFactory.Result cancel()
Creates a new result with a CANCEL status code.
Notification getNotification()
Gets the Notification.
int getStatus()
Gets the status.
static NotificationFactory.Result notification(Notification notification)
Creates a new result containing a notification.
static NotificationFactory.Result 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 NotificationFactory.Result 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 NotificationFactory.Result notification (Notification notification)

Creates a new result containing a notification.

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

public static NotificationFactory.Result retry ()

Creates a new result with a RETRY status code.

Returns
  • An instance of NotificationFactory.Result.