Package com.iizix.push
Class PushNotificationEvent
java.lang.Object
com.iizix.push.PushNotificationEvent
Push notification event generated when a push notification state changes, e.g. a notification has been sent successfully, or when the operation failed, the client unknown or the push service is stopped.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- final ThrowableThe exception thrown in case of- PushNotificationState.ERROR,- nullotherwise.- final PushNotificationStateThe notification event state.
- Constructor SummaryConstructorsConstructorDescriptionCreates a notification event without exception, e.g.- PushNotificationEvent- (Throwable exception) Creates a notification event with exception, i.e.
- Method Summary
- Field Details- stateThe notification event state.
- exceptionThe exception thrown in case of- PushNotificationState.ERROR,- nullotherwise.
 
- Constructor Details- PushNotificationEventCreates a notification event without exception, e.g. for the types- PushNotificationState.SUCCESSor- PushNotificationState.SERVICE_STOPPED.- Parameters:
- state- The notification state: must be either- PushNotificationState.SUCCESSor- PushNotificationState.SERVICE_STOPPED
- Throws:
- IllegalArgumentException- For invalid- stateas- PushNotificationState.ERRORrequires an- exception.
- NullPointerException- If- stateis- null.
 
- PushNotificationEventCreates a notification event with exception, i.e. for the state- PushNotificationState.ERROR.- Parameters:
- exception- The exception, non-null.
- Throws:
- IllegalArgumentException- For invalid- stateif- exceptionis- null.
- NullPointerException- If- stateis- nullor- PushNotificationState.ERRORand- exceptionis- null.
 
 
- Method Details- getStateGets the notification event type.- Returns:
- The type.
 
- getExceptionGets the exception in case an error occurred, i.e. if- getState()returns- PushNotificationState.ERROR.- Returns:
- The exception, or nullfor none.
 
- hashCodepublic int hashCode()
- equals
- toString