public class NotificationMethodMapBuilder extends Object
EventSender
- interface of any notification method implementationEventSenderMailImpl
- implements email notification methodNotificationMethodFactory
- interface of factories of notification method classes. Each factory will define theNotificationMethodFactoryEmailImpl
- factory for producing a single email notification method classNotificationMethodMapBuilder.NotificationMethodFactoryMapper
- stores the association between the notification method type to its factoryNotificationMethodMapBuilder
- creates the map of notification method type to the factory. Could be recreated
upon EventNotificationMethods
, e.g. SMS(1)
EventSenderSMSImpel
which implements the EventSender
. The class will be responsible for
dispatching a notification via SMSNotificationMethodFactorySMS
which implements the
NotificationMethodFactory
. The class will be responsible for instantiating the SMS sender class.
NotificationMethodMapBuilder#createMethodsMapper(List)
Modifier and Type | Class and Description |
---|---|
class |
NotificationMethodMapBuilder.NotificationMethodFactoryMapper
A map of the notification method type to its factory.
|
Modifier and Type | Method and Description |
---|---|
NotificationMethodMapBuilder.NotificationMethodFactoryMapper |
createMethodsMapper(List<event_notification_methods> notificationMethods,
Map<String,String> properties)
Maps pairs of notification method type to the factory which produces the class that handles the notification
action.
Design meant to provide a varied instantiation of the method type implementation class. |
static NotificationMethodMapBuilder |
instance()
a getter of single instance of the method builder
|
public static NotificationMethodMapBuilder instance()
public NotificationMethodMapBuilder.NotificationMethodFactoryMapper createMethodsMapper(List<event_notification_methods> notificationMethods, Map<String,String> properties)
notificationMethods
- supported list of notification methodsproperties
- configuration properties for the factoriesCopyright © 2012. All Rights Reserved.