|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.acknowledgement.NotificationProcessorServiceImpl
public class NotificationProcessorServiceImpl
Implementation of the NotificationProcessorService interface.
| Constructor Summary | |
|---|---|
NotificationProcessorServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addNotification(Notification notification)
Checks if the result notification queue is not full and places a Notification into it and starts the run thread. |
void |
destroy()
Attempts to stop threads when the bean is destroyed. |
int |
getNotificationProcessorActiveThreadCount()
Returns the number of threads actively processing notifications. |
int |
getNotificationProcessorQueueSize()
Returns the size of the result notification queue. |
int |
getNotificationProcessorThreadPoolSize()
Returns the number of threads currently in the thread pool (active and idle). |
int |
getNotificationProcessorWorkQueueSize()
Returns the size of the work queue which holds tasks (Runnables) waiting to be picked up and processed using an active thread. |
boolean |
isResultNotificationQueueFull()
Determines whether or not the processing queue is already full. |
void |
processNotifications(List<Notification> notifications)
Note that this method is used internally by the SDK and should not normally be externally invoked or overridden. |
void |
reconcile(List<Notification> notifications)
Note that this method is used internally by the SDK and should not normally be externally invoked or overridden. |
void |
run()
Makes a call to the getBatchOfNotifications method that batches the result notification messages. |
void |
setNotificationListenerService(NotificationListenerService notificationListenerService)
Support for dependency injection. |
void |
setPushApplicationService(PushApplicationService pushApplicationService)
Support for dependency injection. |
void |
setPushCountService(PushCountService pushCountService)
Support for dependency injection. |
void |
setPushRequestDetailService(PushRequestDetailService pushRequestDetailService)
Support for dependency injection. |
void |
setPushRequestService(PushRequestService pushRequestService)
Support for dependency injection. |
void |
setPushSDKProperties(PushSDKProperties properties)
Support for dependency injection. |
void |
setSubscriptionService(SubscriptionService subscriptionService)
Support for dependency injection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NotificationProcessorServiceImpl()
| Method Detail |
|---|
public void setPushSDKProperties(PushSDKProperties properties)
NotificationProcessorServicePushSDKProperties collaborating object - this
is used to read global configuration properties.
setPushSDKProperties in interface NotificationProcessorServiceproperties - an instance of a PushSDKProperties implementation (must be thread safe)public void setPushApplicationService(PushApplicationService pushApplicationService)
NotificationProcessorServicePushApplicationService collaborating object -
this is used to interface with the business service that manages push applications.
setPushApplicationService in interface NotificationProcessorServicepushApplicationService - an instance of a PushApplicationService implementation (must be thread safe)public void setPushCountService(PushCountService pushCountService)
NotificationProcessorServicePushCountService collaborating object - this
is used to interface with the business service that manages tracking pushes that are complete.
setPushCountService in interface NotificationProcessorServicepushCountService - an instance of a PushCountService implementation (must be thread safe)public void setPushRequestDetailService(PushRequestDetailService pushRequestDetailService)
NotificationProcessorServicePushRequestDetailService collaborating object
- this is used to interface with the business service that manages push request details.
setPushRequestDetailService in interface NotificationProcessorServicepushRequestDetailService - an instance of a PushRequestDetailService implementation (must be thread safe)public void setSubscriptionService(SubscriptionService subscriptionService)
NotificationProcessorServiceSubscriptionService collaborating object -
this is used to interface with the business service that manages subscribers.
setSubscriptionService in interface NotificationProcessorServicesubscriptionService - an instance of a SubscriptionService implementation (must be thread safe)public void setPushRequestService(PushRequestService pushRequestService)
NotificationProcessorServicePushRequestService collaborating object - this
is used to interface with the business service that manages push requests.
setPushRequestService in interface NotificationProcessorServicepushRequestService - an instance of a PushRequestService implementation (must be thread safe)public void setNotificationListenerService(NotificationListenerService notificationListenerService)
NotificationProcessorServiceNotificationListenerService collaborating
object - this is used to interface with the business service that manages notifying the acknowledgement listeners.
setNotificationListenerService in interface NotificationProcessorServicenotificationListenerService - an instance of a NotificationListenerService implementation (must be thread safe)public void destroy()
NotificationProcessorService
destroy in interface NotificationProcessorServicepublic int getNotificationProcessorQueueSize()
NotificationProcessorService
getNotificationProcessorQueueSize in interface NotificationProcessorServicepublic int getNotificationProcessorActiveThreadCount()
NotificationProcessorService
getNotificationProcessorActiveThreadCount in interface NotificationProcessorServicepublic int getNotificationProcessorThreadPoolSize()
NotificationProcessorService
getNotificationProcessorThreadPoolSize in interface NotificationProcessorServicepublic int getNotificationProcessorWorkQueueSize()
NotificationProcessorService
getNotificationProcessorWorkQueueSize in interface NotificationProcessorServicepublic boolean isResultNotificationQueueFull()
NotificationProcessorService
isResultNotificationQueueFull in interface NotificationProcessorService
public void addNotification(Notification notification)
throws PushSDKException
PushSDKException that is wrapped around a
FullNotificationQueueException.
addNotification in interface NotificationProcessorServicenotification - the notification to add to the queue
PushSDKException - if the notification could not be added to the queue because the queue is fullpublic void run()
getBatchOfNotifications method that batches the result notification messages.
run in interface Runnablerun in interface NotificationProcessorService
public void processNotifications(List<Notification> notifications)
throws PushSDKException
NotificationProcessorServicestorePushRequest set to
true; This includes updating the status of the push request details in the repository - if the original push
was made to the push application with autoDeleteRequests set to true; the push request and it's
details will be permanently removed from the persistent storebypassSubscription case): automatically unsubscribe a user when the
result notification indicates that the specified address was not recognized by the PPG (i.e. 2002 status code)
processNotifications in interface NotificationProcessorServicenotifications - list of value objects that represent notifications
PushSDKException - if the result notifications cannot be processed for various reasons
public void reconcile(List<Notification> notifications)
throws PushSDKException
NotificationProcessorService
reconcile in interface NotificationProcessorServicenotifications - list of value objects that represent notifications
PushSDKException - if the result notifications cannot be processed for various reasons
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||