Class CommonNotification
java.lang.Object
pt.unl.fct.di.novasys.babel.generic.ProtoNotification
pt.unl.fct.di.novasys.babel.protocols.storage.notifications.common.CommonNotification
- Direct Known Subclasses:
CommonDataNotification,ServerDownNotification
public abstract class CommonNotification
extends pt.unl.fct.di.novasys.babel.generic.ProtoNotification
An abstract class common to all notifications issued by the storage layer
protocols. This class stores the notification identifier, as well as an
optional message detailing information about the notification contents.
-
Constructor Summary
ConstructorsConstructorDescriptionCommonNotification(short notificationID) Constructs a common notification with the notification identifier.CommonNotification(String message, short notificationID) Constructs a common notification with a message describing the contents of the notification, as well the notification identifier. -
Method Summary
Modifier and TypeMethodDescriptionGets the message associated with the notification.Methods inherited from class pt.unl.fct.di.novasys.babel.generic.ProtoNotification
getId
-
Constructor Details
-
CommonNotification
Constructs a common notification with a message describing the contents of the notification, as well the notification identifier.- Parameters:
message- message describing the contents of the notificationnotificationID- the notification identifier
-
CommonNotification
public CommonNotification(short notificationID) Constructs a common notification with the notification identifier.- Parameters:
notificationID- the notification identifier
-
-
Method Details
-
getMessage
Gets the message associated with the notification. If none was passed on the constructor, returns an empty string.- Returns:
-