blob: 4ff59fec087e64a9a138a67ae2eb075d9a529cce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.notification;
import java.util.Map;
/**
* Object to cache fired notifications before all handler implementations are
* ready registered.
*
* @author Ingo Bauersachs
*/
public class NotificationData
{
private final String eventType;
private final String title;
private final String message;
private final Map<String,String> extra;
private final byte[] icon;
private final Object tag;
/**
* Creates a new instance of this class.
*
* @param eventType the type of the event that we'd like to fire a
* notification for.
* @param title the title of the given message
* @param message the message to use if and where appropriate (e.g. with
* systray or log notification.)
* @param extra additional data (such as caller information)
* @param icon the icon to show in the notification if and where appropriate
* @param tag additional info to be used by the notification handler
*/
NotificationData(String eventType, String title, String message,
Map<String,String> extra, byte[] icon, Object tag)
{
this.eventType = eventType;
this.title = title;
this.message = message;
this.extra = extra;
this.icon = icon;
this.tag = tag;
}
/**
* Gets the type of the event that we'd like to fire a notification for
*
* @return the eventType
*/
public String getEventType()
{
return eventType;
}
/**
* Gets the title of the given message.
*
* @return the title
*/
String getTitle()
{
return title;
}
/**
* Gets the message to use if and where appropriate (e.g. with systray or
* log notification).
*
* @return the message
*/
String getMessage()
{
return message;
}
/**
* Gets additional data (such as caller information).
*
* @return the extra data
*/
public Map<String,String> getExtra()
{
return extra;
}
/**
* Gets the icon to show in the notification if and where appropriate.
*
* @return the icon
*/
byte[] getIcon()
{
return icon;
}
/**
* Gets additional info to be used by the notification handler.
*
* @return the tag
*/
Object getTag()
{
return tag;
}
}
|