public abstract class Notification
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_CLIENT_IP
Notification attribute name: client IP.
|
static java.lang.String |
ATTR_DATA
Notification attribute name: notification data.
|
static java.lang.String |
ATTR_DATE
Notification attribute name: notification date.
|
static java.lang.String |
ATTR_EMAIL
Notification attribute name: e-mail.
|
static java.lang.String |
ATTR_EMAIL_ON_TYPE
Notification attribute name: notification e-mail on type.
|
static java.lang.String |
ATTR_JOB_ID
Notification attribute name: job ID.
|
static java.lang.String |
ATTR_NOTIFICATION_ID
Notification attribute name: notification ID.
|
static java.lang.String |
ATTR_NOTIFICATION_MESSAGE_TYPE
Notification attribute name: notification message type.
|
static java.lang.String |
ATTR_NOTIFICATION_TYPE
Notification attribute name: notification type.
|
static java.lang.String |
ATTR_PORT
Notification attribute name: port number.
|
static java.lang.String |
ATTR_SERVER_ID
Notification attribute name: server ID.
|
static java.lang.String |
ATTR_VALUE_EMAIL_ON_ALL
Notification attribute name: email on all.
|
static java.lang.String |
ATTR_VALUE_EMAIL_ON_DONE
Notification attribute name: email on job done.
|
static java.lang.String |
ATTR_VALUE_EMAIL_ON_FAILED
Notification attribute name: email on job failure.
|
static java.lang.String |
ATTR_VALUE_EMAIL_ON_INTERRUPTED
Notification attribute name: email on job interrupted.
|
static char |
NotificationAttributeSeparator
The character that separates the attribute value from the attribute name.
|
static char |
NotificationDataSeparator
The character that separates notification data.
|
static char |
NotificationObjectSeparator
The character that separates notification objects.
|
static java.lang.String |
NotificationPrefix
The prefix for every notification.
|
static char |
NotificationSeparator
The separator character used between notification strings.
|
Constructor and Description |
---|
Notification() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAttributeList()
Retrieves the attribute list of the notification.
|
java.lang.String |
getAttributeValue(java.lang.String attr)
Retrieves the named attribute value from the notification.
|
java.lang.String |
getAttributeValuePair(java.lang.String attr)
Retrieves the named attribute name/value pair from the notification.
|
java.lang.String |
getCanonicalString()
Retrieves the string representation of the notification.
|
java.lang.String |
getClientIP()
Retrieves the client IP.
|
java.lang.String |
getJobId()
Retrieves the job ID.
|
java.lang.String |
getNotificationId()
Retrieves the notification ID.
|
static eNotificationMessageType |
getNotificationMessageType(java.lang.String val)
Retrieves the enum type of the corresponding notification type string.
|
java.lang.String |
getNotificationMessageTypeValue()
Retrieves the value of the type attribute of the notification.
|
static java.lang.String |
getNotificationMessageTypeValue(eNotificationMessageType type)
Retrieves the value of the type attribute of the notification.
|
NotificationType |
getNotificationType() |
int |
getPort()
Retrieves the port.
|
java.util.Date |
getTime()
Retrieves the time.
|
eNotificationMessageType |
getType()
Retrieves the type.
|
boolean |
hasAllRequiredAttributesSpecified()
Checks whether all required attributes are specified.
|
boolean |
isJobStatusNotification()
Checks whether the notification is for job status change.
|
void |
setAttributeValue(java.lang.String attr,
java.lang.String value)
Sets an attribute value.
|
void |
setClientIP(java.lang.String clientIP)
Sets the client IP.
|
void |
setJobId(java.lang.String jobId)
Sets the job ID.
|
void |
setNotificationId(java.lang.String notificationId)
Sets the notification ID.
|
void |
setNotificationType(NotificationType notificationType) |
void |
setPort(int port)
Sets the port.
|
void |
setTime(java.util.Date time)
Sets the time attribute.
|
void |
setType(eNotificationMessageType type)
Sets the notification type.
|
java.lang.String |
toString()
Retrieves the string representation of the notification message.
|
public static final java.lang.String NotificationPrefix
public static final char NotificationSeparator
public static final char NotificationAttributeSeparator
public static final char NotificationDataSeparator
public static final char NotificationObjectSeparator
public static final java.lang.String ATTR_JOB_ID
public static final java.lang.String ATTR_NOTIFICATION_ID
public static final java.lang.String ATTR_CLIENT_IP
public static final java.lang.String ATTR_PORT
public static final java.lang.String ATTR_SERVER_ID
public static final java.lang.String ATTR_NOTIFICATION_MESSAGE_TYPE
public static final java.lang.String ATTR_NOTIFICATION_TYPE
public static final java.lang.String ATTR_DATE
public static final java.lang.String ATTR_DATA
public static final java.lang.String ATTR_EMAIL
public static final java.lang.String ATTR_EMAIL_ON_TYPE
public static final java.lang.String ATTR_VALUE_EMAIL_ON_ALL
public static final java.lang.String ATTR_VALUE_EMAIL_ON_DONE
public static final java.lang.String ATTR_VALUE_EMAIL_ON_FAILED
public static final java.lang.String ATTR_VALUE_EMAIL_ON_INTERRUPTED
public java.lang.String getAttributeValue(java.lang.String attr)
attr
- The name of a notification attribute.public java.lang.String getAttributeValuePair(java.lang.String attr)
attr
- The name of a notification attribute.public void setAttributeValue(java.lang.String attr, java.lang.String value)
attr
- The name of the attribute to be set.value
- The value of the attribute to be set.public java.util.List<java.lang.String> getAttributeList()
public boolean hasAllRequiredAttributesSpecified()
true
if all required attributes have been specified; otherwise false
.public boolean isJobStatusNotification()
true
if the notification is for job status change; otherwise false
.public static eNotificationMessageType getNotificationMessageType(java.lang.String val)
eNotificationMessageType
public static java.lang.String getNotificationMessageTypeValue(eNotificationMessageType type)
type
- An enum type value.eNotificationMessageType
public java.lang.String getNotificationMessageTypeValue()
public void setTime(java.util.Date time)
time
- The time to set.public java.util.Date getTime()
public void setType(eNotificationMessageType type)
type
- The type to set.eNotificationMessageType
public eNotificationMessageType getType()
eNotificationMessageType
public void setNotificationType(NotificationType notificationType)
public NotificationType getNotificationType()
public void setJobId(java.lang.String jobId)
jobId
- The job ID to set.public java.lang.String getJobId()
public void setClientIP(java.lang.String clientIP)
clientIP
- The client IP to set.public java.lang.String getClientIP()
public void setPort(int port)
port
- The port to set.public int getPort()
public void setNotificationId(java.lang.String notificationId)
notificationId
- The notification ID to set.public java.lang.String getNotificationId()
public java.lang.String getCanonicalString()
public java.lang.String toString()
toString
in class java.lang.Object