Nitido Inc.

com.nitido.nimx.services.notification.channels
Class SMSDeliveryChannel

java.lang.Object
  extended by com.nitido.nimx.services.notification.channels.DeliveryChannel
      extended by com.nitido.nimx.services.notification.channels.SMSDeliveryChannel
All Implemented Interfaces:
NotificationConstants

public class SMSDeliveryChannel
extends DeliveryChannel

An implemenation of the delivery channel that handles the sending of SMS messages to mobile phones.


Field Summary
 
Fields inherited from class com.nitido.nimx.services.notification.channels.DeliveryChannel
_confService, _ticketCache
 
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
SMSDeliveryChannel(NiMKernelServiceVisa visa)
           
 
Method Summary
 boolean canDeliverTo(Member target)
          Determines whether the member has the requied information for this delivery channel to be able to send a message to the user.
 java.lang.String deliver(NotificationMessage msg)
          Starts the delivery process for this message (or places it into some sort of internal queue).
 java.lang.String getKey()
          Returns the key to use when referring to this delivery method.
 java.lang.String getProtocolPrefix()
          "mailto://" -> EmailDeliveryChannel "mobile://" -> SMSDeliveryChannel etc.
 IndividualStatus getStatus(java.lang.String ticket)
          Notification service uses this method to get an updated status object before returning to the client.
 void init(StatusTicketCache cache, ConfigurationService conf)
          Initializes the delivery channel by providing access to the status ticket cache and the configuration service.
 boolean isStandardTicket(java.lang.String ticket)
          The implementation of the delivery channel determines whether the given status ticket belongs to its set of standard tickets that do not require storage in the status cache.
 boolean validateRecipient(java.lang.String recipient)
          Determines whether the recipient string is a valid address/phone etc that this delivery channel can use.
 
Methods inherited from class com.nitido.nimx.services.notification.channels.DeliveryChannel
getConfigPropertiesByPrefix, getConfigProperty, getTicketCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMSDeliveryChannel

public SMSDeliveryChannel(NiMKernelServiceVisa visa)
Method Detail

init

public void init(StatusTicketCache cache,
                 ConfigurationService conf)
          throws InitializationFailedException
Description copied from class: DeliveryChannel
Initializes the delivery channel by providing access to the status ticket cache and the configuration service.

Overrides:
init in class DeliveryChannel
Parameters:
cache - status ticket cache
conf - configuration service
Throws:
InitializationFailedException

canDeliverTo

public boolean canDeliverTo(Member target)
Description copied from class: DeliveryChannel
Determines whether the member has the requied information for this delivery channel to be able to send a message to the user.

Specified by:
canDeliverTo in class DeliveryChannel
Parameters:
target - the Member object to which the message will be delivered
Returns:
true if the Member object contains the information this delivery channel requires to attempt a message delivery, false otherwise

deliver

public java.lang.String deliver(NotificationMessage msg)
                         throws NotificationServiceException
Description copied from class: DeliveryChannel
Starts the delivery process for this message (or places it into some sort of internal queue).

Specified by:
deliver in class DeliveryChannel
Parameters:
msg - the message to be sent out
Returns:
the status ticket for this message
Throws:
NotificationServiceException - if the delivery channel is unable to initiate the delivery of the message

getKey

public java.lang.String getKey()
Description copied from class: DeliveryChannel
Returns the key to use when referring to this delivery method.

Specified by:
getKey in class DeliveryChannel
Returns:
key for this delivery channel

getProtocolPrefix

public java.lang.String getProtocolPrefix()
Description copied from class: DeliveryChannel
"mailto://" -> EmailDeliveryChannel "mobile://" -> SMSDeliveryChannel etc. an address with a prefix that is not listed will generate an error,

Specified by:
getProtocolPrefix in class DeliveryChannel

getStatus

public IndividualStatus getStatus(java.lang.String ticket)
Description copied from class: DeliveryChannel
Notification service uses this method to get an updated status object before returning to the client. The delivery channel implementations will individually determine whether the ticket represents a standard status, in which case the status object is constructed right there, or the delivery channel retrieves the status object from the status cache.

Specified by:
getStatus in class DeliveryChannel
Parameters:
ticket - the status ticket that is being requested from the channel
Returns:
the individual status which corresponds to the ticket provided as an argument

validateRecipient

public boolean validateRecipient(java.lang.String recipient)
Description copied from class: DeliveryChannel
Determines whether the recipient string is a valid address/phone etc that this delivery channel can use.

Specified by:
validateRecipient in class DeliveryChannel

isStandardTicket

public boolean isStandardTicket(java.lang.String ticket)
Description copied from class: DeliveryChannel
The implementation of the delivery channel determines whether the given status ticket belongs to its set of standard tickets that do not require storage in the status cache.

Specified by:
isStandardTicket in class DeliveryChannel
Parameters:
ticket - status ticket
Returns:
true if the ticket is this delivery's channel standard ticket, false otherwise

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.