|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.NiMKernelService
com.nitido.nim.NotificationService
com.nitido.nimx.services.notification.NotificationServiceImpl
public class NotificationServiceImpl
Field Summary |
---|
Fields inherited from interface com.nitido.nimx.services.notification.NotificationConstants |
---|
CONF_KEY_CACHE_EXPIRE_TIME, CONF_KEY_CACHE_MAX_TIME, CONF_KEY_CACHE_PREFIX, CONF_KEY_CACHE_REMOVE_FINAL, CONF_KEY_CACHE_SLEEP_TIME, CONF_KEY_DELIVERY_CHANNEL_LIST_PREFIX, CONF_KEY_DELIVERY_CHANNELS_PREFIX, KEY_TRANSACTION_PREFIX, LEN_PREFIX_TOKEN, LEN_PREFIX_USER_SPACE, PREFIX_TOKEN, PREFIX_USER_SPACE, PROTOCOL_ADDRESS_SEPARATOR, TICKET_SEPARATOR |
Constructor Summary | |
---|---|
NotificationServiceImpl(NiMKernelServiceVisa visa)
|
Method Summary | |
---|---|
static java.lang.String |
getDeliveryChannelId(java.lang.String recipient)
Extracts the delivery channel ID from the full recipient string. |
protected IndividualStatus |
getIndividualStatus(java.lang.String ticket)
Get the individual status stored in the status cache for this ticket. |
protected static NotificationService |
getInstance()
Get the singleton instance of the notification service. |
static java.lang.String |
getRecipientId(java.lang.String recipient)
Extracts the recipient address from the full string. |
NotificationStatus |
getStatus(java.lang.String ticket)
Retrieves the latest status for a given status ticket. |
protected void |
init(NiMKernel kernel,
ConfigurationService confService)
This method is used to initialize the kernel service. |
protected void |
loadDeliveryChannel(java.lang.String className)
Loads a delivery channel based on the class name given as argument. |
protected void |
loadDeliveryChannels()
Loads all of the delivery channels sepcified in the configuration properties. |
java.lang.String |
sendNotification(NotificationMessage msg)
Send out the notification message to the recipient(s) supplied in the message object. |
void |
signalBirth()
Invoked by the system's listener when the whole server is starting up. |
void |
signalDeath()
Invoked by the system's listener when the whole server is shutting down. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotificationServiceImpl(NiMKernelServiceVisa visa)
Method Detail |
---|
protected void init(NiMKernel kernel, ConfigurationService confService) throws InitializationFailedException, NiMException
NiMKernelService
init
in class NotificationService
kernel
- Reference to the NiMKernel object that instantiated the
service.confService
- A reference to the configuration service. All the service
implementations (except ConfigurationService)
should retrieve the setting information from it.
InitializationFailedException
- If unable to initialize the kernel service.
NiMException
- If service initialization can not be done due to failure in
establish a connection to the back-end service. Not all
service implementation will throw this exception.protected void loadDeliveryChannels() throws NotificationServiceException
NotificationServiceException
- if the protocol prefix has already
been loaded, if there is a problem loading the appropriate implementation
class for the delivery channelprotected void loadDeliveryChannel(java.lang.String className) throws NotificationServiceException
className
- the full class name of the delivery channel to load
NotificationServiceException
protected static NotificationService getInstance()
public java.lang.String sendNotification(NotificationMessage msg) throws NotificationServiceException
NotificationService
sendNotification
in class NotificationService
msg
- the notification message object containing the recipient(s)
and the message content.
NotificationServiceException
- thrown for one of two reasons
- unable to create a status ticket to return to the client
- invalid data in the notification message objectpublic static java.lang.String getDeliveryChannelId(java.lang.String recipient)
recipient
- the full recipient string
public static java.lang.String getRecipientId(java.lang.String recipient)
recipient
- the full recipient string
public NotificationStatus getStatus(java.lang.String ticket) throws StatusNotFoundException
NotificationService
getStatus
in class NotificationService
ticket
- the ticket ID that was returned by the sendNotification
method
StatusNotFoundException
- if the ticket does not match any tickets
known to the serviceprotected IndividualStatus getIndividualStatus(java.lang.String ticket) throws StatusNotFoundException
ticket
- the status ticket
StatusNotFoundException
- if no status object was found for the
provided ticketpublic void signalBirth()
NotificationService
signalBirth
in class NotificationService
public void signalDeath()
NotificationService
signalDeath
in class NotificationService
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.