Nitido Inc.

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

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

public class StubEmailDeliveryChannel
extends EmailDeliveryChannel

This class is used for testing purposes. It extends the EmailDeliveryChannel and the only change it makes is overriding the sendMessage() method to avoid initiating an SMTP connection and sending out the email for real. Instead it prints the to, from and message contents to the standard log.


Field Summary
 
Fields inherited from class com.nitido.nimx.services.notification.channels.EmailDeliveryChannel
_maxSMTPconnections, _smtpProperties
 
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
StubEmailDeliveryChannel(NiMKernelServiceVisa visa)
           
 
Method Summary
 void init(StatusTicketCache cache, ConfigurationService conf)
          Initializes the delivery channel by providing access to the status ticket cache and the configuration service.
protected  void loadProperties()
          Loads configuratioin properties.
 void sendMessage(javax.mail.Message msg, javax.mail.Address[] addr)
           
 void setMaxSMTPConnections(int max)
           
 
Methods inherited from class com.nitido.nimx.services.notification.channels.EmailDeliveryChannel
canDeliverTo, connectSMTP, createMessage, deliver, disconnectSMTP, getActualConfigProperty, getKey, getProtocolPrefix, getStatus, isStandardTicket, sendMessage, validateRecipient
 
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

StubEmailDeliveryChannel

public StubEmailDeliveryChannel(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 EmailDeliveryChannel
Parameters:
cache - status ticket cache
conf - configuration service
Throws:
InitializationFailedException

loadProperties

protected void loadProperties()
                       throws InitializationFailedException
Description copied from class: EmailDeliveryChannel
Loads configuratioin properties.

Overrides:
loadProperties in class EmailDeliveryChannel
Throws:
InitializationFailedException

setMaxSMTPConnections

public void setMaxSMTPConnections(int max)

sendMessage

public void sendMessage(javax.mail.Message msg,
                        javax.mail.Address[] addr)
                 throws javax.mail.SendFailedException,
                        javax.mail.MessagingException,
                        NotificationServiceException
Throws:
javax.mail.SendFailedException
javax.mail.MessagingException
NotificationServiceException

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.