Interface NotificationService
-
- All Known Implementing Classes:
NotificationServiceImpl
public interface NotificationService
Contains the necessary methods to implement in the notification service.- Author:
- Lina Sofia Cardona Martinez <lina.cardona@kuwaiba.org>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractSender
connect(NotificationType notificationType, AbstractSender sender)
Makes the connection on the channel through which notifications are to be sent.void
disconnect(NotificationType notificationType, AbstractSender sender)
Closes an existing sessionvoid
sendMulticastNotification(NotificationType notificationType, AbstractMessage message, AbstractSender sender, List<AbstractRecipient> recipients)
Send a notification to multiple recipientsvoid
sendUnicastNotification(NotificationType notificationType, AbstractMessage message, AbstractSender sender, AbstractRecipient recipient)
Send a notification to a single recipient
-
-
-
Method Detail
-
connect
AbstractSender connect(NotificationType notificationType, AbstractSender sender) throws NotificationConnectionException, NotificationParamsException, NotificationTypeException
Makes the connection on the channel through which notifications are to be sent.- Parameters:
notificationType
- Type of notifications to be sentsender
- Information of the sender of the notification message- Returns:
- sender
- Throws:
NotificationTypeException
- Exception thrown if the notification type is not found.NotificationConnectionException
- Exception thrown if the connection cannot be made.NotificationParamsException
- Exception thrown if the sender's parameters are not sufficient to establish the connection.
-
sendUnicastNotification
void sendUnicastNotification(NotificationType notificationType, AbstractMessage message, AbstractSender sender, AbstractRecipient recipient) throws NotificationTypeException, NotificationMessageException, NotificationParamsException
Send a notification to a single recipient- Parameters:
notificationType
- Type of notifications to be sentmessage
- Information message to be sentsender
- Information of the sender of the notification messagerecipient
- contains the information about the receiver.- Throws:
NotificationTypeException
- Exception thrown if the notification type is not found.NotificationMessageException
NotificationParamsException
-
sendMulticastNotification
void sendMulticastNotification(NotificationType notificationType, AbstractMessage message, AbstractSender sender, List<AbstractRecipient> recipients) throws NotificationTypeException, NotificationMessageException, NotificationParamsException
Send a notification to multiple recipients- Parameters:
notificationType
- Type of notifications to be sentmessage
- Information message to be sentsender
- Information of the sender of the notification messagerecipients
- contains the information about each receiver.- Throws:
NotificationTypeException
- Exception thrown if the notification type is not found.NotificationMessageException
NotificationParamsException
-
disconnect
void disconnect(NotificationType notificationType, AbstractSender sender) throws NotificationTypeException
Closes an existing session- Parameters:
notificationType
- Type of notificationssender
- Information of the sender of the notification message- Throws:
NotificationTypeException
- Exception thrown if the notification type is not found.
-
-