public class Notification extends HashMap<String,String>
java.util.Map
implementation that is used in concert with the OSGi Event Admin for
publishing notification EventsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static String |
NOTIFICATION_KEY_APPLICATION |
static String |
NOTIFICATION_KEY_ID |
static String |
NOTIFICATION_KEY_MESSAGE |
static String |
NOTIFICATION_KEY_SESSION_ID |
static String |
NOTIFICATION_KEY_TIMESTAMP |
static String |
NOTIFICATION_KEY_TITLE |
static String |
NOTIFICATION_KEY_USER_ID |
static String |
NOTIFICATION_TOPIC_BROADCAST |
static String |
NOTIFICATION_TOPIC_DOWNLOADS |
static String |
NOTIFICATION_TOPIC_PUBLISH |
static String |
NOTIFICATION_TOPIC_ROOT |
Constructor and Description |
---|
Notification(String id,
String sessionId,
String application,
String title,
String message,
Date timestamp)
Constructs a Notification with the specified application name, title message, and timestamp.
|
Notification(String id,
String sessionId,
String application,
String title,
String message,
Date timestamp,
String userId)
Constructs a Notification with the specified application name, title message, timestamp, and
user ID.
|
Notification(String id,
String sessionId,
String application,
String title,
String message,
Long timestamp)
Constructs a Notification with the specified application name, title message, and timestamp.
|
Notification(String id,
String sessionId,
String application,
String title,
String message,
Long timestamp,
String userId)
Constructs a Notification with the specified application name, title message, timestamp, and
user ID.
|
Modifier and Type | Method and Description |
---|---|
String |
getApplication()
Returns the name of the application that triggered the generation of the
Notification |
String |
getId()
Returns the ID of the
Notification |
String |
getMessage()
Returns the name of the message associated with the
Notification |
String |
getSessionId()
Returns the Session ID of the
Notification |
Date |
getTimestamp()
Returns a
Date depicting the time at which the event that triggered this Notification occurred. |
Long |
getTimestampLong()
Returns a
long depicting the time at which the event that triggered this Notification occurred. |
String |
getTimestampString()
Returns a
String depicting the time at which the event that triggered this Notification occurred. |
String |
getTitle()
Returns the name of the title of the
Notification |
String |
getUserId()
Returns the id of the user to whom this
Notification is addressed. |
void |
setApplication(String application)
Overwrites the name of the application that triggered the generation of the
Notification |
void |
setId(String id)
Overwrites the ID of the
Notification |
void |
setMessage(String message)
Overwrites the message associated with the
Notification |
void |
setSessionId(String sessionId)
Overwrites the Session ID of the
Notification |
void |
setTimestamp(Date timestamp)
Overwrites the timestamp that depicts the time at which the event that triggered the
Notification occurred. |
void |
setTimestamp(Long timestamp)
Overwrites the timestamp that depicts the time at which the event that triggered the
Notification occurred. |
void |
setTitle(String title)
Overwrites the title of the
Notification |
void |
setUserId(String userId)
Overwrites the id of the user to whom the
Notification is addressed. |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
public static final String NOTIFICATION_KEY_ID
public static final String NOTIFICATION_KEY_APPLICATION
public static final String NOTIFICATION_KEY_MESSAGE
public static final String NOTIFICATION_KEY_TIMESTAMP
public static final String NOTIFICATION_KEY_TITLE
public static final String NOTIFICATION_KEY_USER_ID
public static final String NOTIFICATION_KEY_SESSION_ID
public static final String NOTIFICATION_TOPIC_ROOT
public static final String NOTIFICATION_TOPIC_BROADCAST
public static final String NOTIFICATION_TOPIC_DOWNLOADS
public static final String NOTIFICATION_TOPIC_PUBLISH
public Notification(String id, String sessionId, String application, String title, String message, Date timestamp)
id
- The unique ID of this Notification
sessionId
- The new unique session ID of the Notification
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A Date
representing the point at which the event triggering this
Notification
was generated.\public Notification(String id, String sessionId, String application, String title, String message, Long timestamp)
id
- The unique ID of this Notification
sessionId
- The new unique session ID of the Notification
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A long
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event triggering this Notification
was generated.public Notification(String id, String sessionId, String application, String title, String message, Long timestamp, String userId)
id
- The unique ID of this Notification
sessionId
- The new unique session ID of the Notification
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A long
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event triggering this Notification
was generated.userId
- The id of the user to which this Notification
should be sent.public Notification(String id, String sessionId, String application, String title, String message, Date timestamp, String userId)
id
- The unique ID of this Notification
sessionId
- The new unique session ID of the Notification
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A Date
representing the point at which the event triggering this
Notification
was generated.\userId
- The id of the user to which this Notification
should be sent.public String getId()
Notification
Notification
public void setId(String id)
Notification
id
- The new unique ID of the Notification
public String getSessionId()
Notification
Notification
public void setSessionId(String sessionId)
Notification
sessionId
- The new unique session ID of the Notification
public String getApplication()
Notification
Notification
public void setApplication(String application)
Notification
application
- The new name of the application that triggered the generation of the Notification
public String getTitle()
Notification
Notification
public void setTitle(String title)
Notification
title
- The new title of the Notification
public String getMessage()
Notification
Notification
public void setMessage(String message)
Notification
message
- The new message associated with the Notification
public String getTimestampString()
String
depicting the time at which the event that triggered this Notification
occurred.String
representing the number of milliseconds between January 1, 1970,
00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public Long getTimestampLong()
long
depicting the time at which the event that triggered this Notification
occurred.long
representing the number of milliseconds between January 1, 1970,
00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public Date getTimestamp()
Date
depicting the time at which the event that triggered this Notification
occurred.Date
the point at which the event that triggered this Notification
occurred.public void setTimestamp(Long timestamp)
Notification
occurred.timestamp
- A long
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public void setTimestamp(Date timestamp)
Notification
occurred.timestamp
- A Date
representing the point at which the event that triggered
this Notification
occurred.public String getUserId()
Notification
is addressed.Notification
is addressed.public void setUserId(String userId)
Notification
is addressed.userId
- The new userId to whom the Notification
should be addressed.This work is licensed under a Creative Commons Attribution 4.0 International License.