public class NotificationData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMAND_NOTIFICATION_HANDLER_CMDARGS_EXTRA
The name/key of the NotificationData extra which is provided to
CommandNotificationHandler.execute(CommandNotificationAction,
Map) i.e. |
static java.lang.String |
POPUP_MESSAGE_HANDLER_TAG_EXTRA
The name/key of the NotificationData extra which is provided to
PopupMessageNotificationHandler.popupMessage(
PopupMessageNotificationAction, String, String, byte[], Object) i.e. |
static java.lang.String |
SOUND_NOTIFICATION_HANDLER_LOOP_CONDITION_EXTRA
The name/key of the NotificationData extra which is provided to
SoundNotificationHandler i.e. |
Constructor and Description |
---|
NotificationData(java.lang.String eventType,
java.lang.String title,
java.lang.String message,
byte[] icon,
java.util.Map<java.lang.String,java.lang.Object> extras)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEventType()
Gets the type of the event that we'd like to fire a notification for
|
java.lang.Object |
getExtra(java.lang.String key)
Gets the
NotificationHandler -specific extra provided to this
instance associated with a specific key. |
(package private) java.util.Map<java.lang.String,java.lang.Object> |
getExtras()
Gets the
NotificationHandler -specific extras provided to this
instance. |
(package private) byte[] |
getIcon()
Gets the icon to show in the notification if and where appropriate.
|
(package private) java.lang.String |
getMessage()
Gets the message to use if and where appropriate (e.g.
|
(package private) java.lang.String |
getTitle()
Gets the title of the given message.
|
public static final java.lang.String COMMAND_NOTIFICATION_HANDLER_CMDARGS_EXTRA
CommandNotificationHandler.execute(CommandNotificationAction,
Map)
i.e. a Map<String,String> which is known by the
(argument) name cmdargs.public static final java.lang.String POPUP_MESSAGE_HANDLER_TAG_EXTRA
PopupMessageNotificationHandler.popupMessage(
PopupMessageNotificationAction, String, String, byte[], Object)
i.e. an
Object which is known by the (argument) name tag.public static final java.lang.String SOUND_NOTIFICATION_HANDLER_LOOP_CONDITION_EXTRA
SoundNotificationHandler
i.e. a Callable<Boolean>
which is known as the condition which determines whether looping sounds
are to continue playing.NotificationData(java.lang.String eventType, java.lang.String title, java.lang.String message, byte[] icon, java.util.Map<java.lang.String,java.lang.Object> extras)
eventType
- the type of the event that we'd like to fire a
notification for.title
- the title of the given messagemessage
- the message to use if and where appropriate (e.g. with
systray or log notification.)icon
- the icon to show in the notification if and where appropriateextras
- additional/extra NotificationHandler
-specific data
to be provided by the new instance to the various
NotificationHandlerspublic java.lang.String getEventType()
java.util.Map<java.lang.String,java.lang.Object> getExtras()
NotificationHandler
-specific extras provided to this
instance.public java.lang.Object getExtra(java.lang.String key)
NotificationHandler
-specific extra provided to this
instance associated with a specific key.key
- the key whose associated NotificationHandler-specific
extra is to be returned. Well known keys are defined by the
NotificationData class as the XXX_EXTRA constants.byte[] getIcon()
java.lang.String getMessage()
java.lang.String getTitle()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.