public class NotificationRequest extends Notification
ATTR_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 |
---|
NotificationRequest()
Specifies the maximum number of notification fields.
|
NotificationRequest(java.util.Date time,
java.lang.String clientIP,
int port,
eNotificationMessageType type,
NotificationType notificationType)
Creates a notification request from a time, a client IP, a port, a
eNotificationType and a job ID.
|
Modifier and Type | Method and Description |
---|---|
static NotificationRequest |
createFromString(java.lang.String str)
Creates a notification request from a string.
|
boolean |
emailOnAll()
Retrieves the email on all attribute of this notification message.
|
boolean |
emailOnDone()
Retrieves the email on done attribute of this notification message.
|
boolean |
emailOnFailed()
Retrieves the email on failed attribute of this notification message.
|
boolean |
emailOnInterrupted()
Retrieves the email on interrupted attribute of this notification message.
|
static java.lang.String |
getDefaultEmail() |
static int |
getDefaultPort() |
java.lang.String |
getEmail()
Retrieves the email attrubute value.
|
boolean |
hasEmail()
Checks whether there is e-mail/
|
static java.util.List<NotificationRequest> |
parseNotificationRequests(java.lang.String str)
Converts a string into multiple instances of this notification request.
|
void |
setDefaultEmail(java.lang.String value) |
void |
setDefaultPort(int value) |
void |
setEmail(java.lang.String email)
Sets the e-mail attribute.
|
void |
setEmailOnAll()
Sets the notification to e-mail on all.
|
void |
setEmailOnDone()
Sets the notification to e-mail on done.
|
void |
setEmailOnFailed()
Sets the notification to e-mail on failed.
|
void |
setEmailOnInterrupted()
Sets the notification to e-mail on interrupted.
|
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 NotificationRequest()
public NotificationRequest(java.util.Date time, java.lang.String clientIP, int port, eNotificationMessageType type, NotificationType notificationType)
time
- The time.clientIp
- The client IP.port
- The client port.type
- The notification type.jobId
- The job ID.eNotificationMessageType
public static java.lang.String getDefaultEmail()
public void setDefaultEmail(java.lang.String value)
public static int getDefaultPort()
public void setDefaultPort(int value)
public static NotificationRequest createFromString(java.lang.String str)
str
- the string representation of the notification message of the form:
NotificationPrefix|time|clientIP|port|NotificationType|jobIdpublic static java.util.List<NotificationRequest> parseNotificationRequests(java.lang.String str)
str
- The string.public void setEmail(java.lang.String email)
email
- An e-mail string.public java.lang.String getEmail()
Notification
public boolean hasEmail()
true
if there is e-mail; otherwise false
.Notification
public void setEmailOnAll()
Notification
public void setEmailOnDone()
Notification
public void setEmailOnFailed()
Notification
public void setEmailOnInterrupted()
Notification
public boolean emailOnAll()
true
if successful; otherwise false
.Notification
public boolean emailOnDone()
true
if successful; otherwise false
.Notification
public boolean emailOnFailed()
true
if successful; otherwise false
.Notification
public boolean emailOnInterrupted()
true
if successful; otherwise false
.Notification