public class NotificationMessage extends Notification implements java.io.Serializable
NotificationRequest
,
Serialized FormATTR_CLIENT_IP, ATTR_DATA, ATTR_DATE, ATTR_EMAIL, ATTR_EMAIL_ON_TYPE, ATTR_JOB_ID, ATTR_NOTIFICATION_ID, ATTR_NOTIFICATION_MESSAGE_TYPE, ATTR_NOTIFICATION_TYPE, ATTR_PORT, ATTR_SERVER_ID, ATTR_VALUE_EMAIL_ON_ALL, ATTR_VALUE_EMAIL_ON_DONE, ATTR_VALUE_EMAIL_ON_FAILED, ATTR_VALUE_EMAIL_ON_INTERRUPTED, NotificationAttributeSeparator, NotificationDataSeparator, NotificationObjectSeparator, NotificationPrefix, NotificationSeparator
Constructor and Description |
---|
NotificationMessage() |
NotificationMessage(java.util.Date time,
java.lang.String serverId,
eNotificationMessageType type,
NotificationType notificationType,
java.lang.String jobId,
java.lang.String[] data)
Creates a notification message from a time, server ID, notification type,
job ID, and a data array.
|
Modifier and Type | Method and Description |
---|---|
static NotificationMessage |
createFromString(java.lang.String str)
Creates a notification message from a string.
|
java.lang.String[] |
getData()
Retrieves the data.
|
SplusStatus |
getJobStatus()
Contains the new job status if notification is of
eNotificationType.eJobStatusChanged type. |
int |
getNTimesNotified()
Implementation detail only.
|
java.lang.String |
getServerId()
Retrieves the server ID
|
void |
incNTimesNotified()
Implementation detail only.
|
static java.util.List<NotificationMessage> |
parseNotificationMessages(java.lang.String str)
Converts a string into multiple instances of this message.
|
void |
setData(java.lang.String[] data)
Sets the data.
|
void |
setServerId(java.lang.String serverId)
Sets the server ID.
|
getAttributeList, getAttributeValue, getAttributeValuePair, getCanonicalString, getClientIP, getJobId, getNotificationId, getNotificationMessageType, getNotificationMessageTypeValue, getNotificationMessageTypeValue, getNotificationType, getPort, getTime, getType, hasAllRequiredAttributesSpecified, isJobStatusNotification, setAttributeValue, setClientIP, setJobId, setNotificationId, setNotificationType, setPort, setTime, setType, toString
public NotificationMessage()
public NotificationMessage(java.util.Date time, java.lang.String serverId, eNotificationMessageType type, NotificationType notificationType, java.lang.String jobId, java.lang.String[] data)
time
- The server time.serverId
- The server ID of the TIBCO Spotfire Statistics Services server.type
- The type of notification.jobId
- The job ID.data
- The content of the message.eNotificationMessageType
public void setServerId(java.lang.String serverId)
serverId
- The server ID to set.public java.lang.String getServerId()
public void setData(java.lang.String[] data)
data
- The data to set.public java.lang.String[] getData()
public SplusStatus getJobStatus()
eNotificationType.eJobStatusChanged
type.SplusStatus
.Thrown
- if the status is called for the notification type other than
eNotificationType.eJobStatusChanged
.public static NotificationMessage createFromString(java.lang.String str)
str
- the string representation of the notification message of the
form:
NotificationPrefix|time|clientIP|port|NotificationType|jobIdpublic void incNTimesNotified()
public int getNTimesNotified()
public static java.util.List<NotificationMessage> parseNotificationMessages(java.lang.String str)
str
- The string to convert to the message instances.