AR System Java API

com.bmc.arsys.api
Class AlertMessageInfo

java.lang.Object
  extended by com.bmc.arsys.api.AlertMessageInfo
All Implemented Interfaces:
Serializable

public class AlertMessageInfo
extends Object
implements Serializable

The AlertMessageInfo class is used to decode a formatted alert message and return its component parts, for example, timestamp, source type, and so on.

See Also:
Serialized Form

Field Summary
static String AR_ALERT_ACK
           
static int AR_ALERT_MSG_ITEM_COUNT
           
static int AR_ALERT_MSG_ITEM_COUNT_V1
           
static int AR_ALERT_MSG_PRIORITY
           
static int AR_ALERT_MSG_PROTOCOL_VERSION
           
static String AR_ALERT_MSG_SEPARATOR
           
static int AR_ALERT_MSG_SERVER_VERSION
           
static int AR_ALERT_MSG_SOURCE
           
static int AR_ALERT_MSG_SOURCE_FORM
           
static int AR_ALERT_MSG_SOURCE_FORM_LEN
           
static int AR_ALERT_MSG_SOURCE_LEN
           
static int AR_ALERT_MSG_SOURCE_OBJECT
           
static int AR_ALERT_MSG_SOURCE_OBJECT_LEN
           
static int AR_ALERT_MSG_SOURCE_SERVER
           
static int AR_ALERT_MSG_SOURCE_SERVER_LEN
           
static int AR_ALERT_MSG_SOURCE_SVR_ADDR
           
static int AR_ALERT_MSG_SOURCE_SVR_ADDR_LEN
           
static int AR_ALERT_MSG_TEXT
           
static int AR_ALERT_MSG_TEXT_LEN
           
static int AR_ALERT_MSG_TIMESTAMP
           
static int AR_ALERT_MSG_TOTAL_LEN
          Constants holding definitions for alert message items
static int AR_ALERT_MSG_TYPE_CODE
           
static int AR_ALERT_SOURCE_AR
           
static int AR_ALERT_SOURCE_CHECK
           
static int AR_ALERT_SOURCE_FB
           
static int AR_ALERT_SOURCE_FIRST
           
static int AR_ALERT_SOURCE_GP
           
 
Constructor Summary
AlertMessageInfo()
          Default constructor
AlertMessageInfo(Timestamp time, int type, int prior, String text, String tag, String svrName, String form, String id)
           
AlertMessageInfo(Timestamp time, int type, int prior, String text, String tag, String svrName, String svrAddr, String form, String id)
           
 
Method Summary
static AlertMessageInfo DecodeAlertMessage(AlertMessageCriteria criteria, Object message, int len)
           
 boolean equals(Object obj)
          Use this method for checking equality between the current object and the provided one.
 String getAlertText()
          Returns the text of the alert.
 String getFormName()
          For AR System, returns the name of the form where the alert was generated from.
 String getObjectId()
          Returns ID of the object of the alert.
 int getPriority()
          Returns the priority of the alert, for informational purposes only.
 String getServerAddr()
          Returns the IP address of the server where the alert was generated from.
 String getServerName()
          Returns the name of the server where the alert was generated from.
 String getSourceTag()
          Returns a string identifying the source of the alert.
 int getSourceType()
          Returns value identifying the source of the alert.
 Timestamp getTimestamp()
          Returns the timestamp when the alert was created.
 int hashCode()
          Returns the hash code value for this instance of the current class.
 String toString()
          Returns a string description of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AR_ALERT_MSG_TOTAL_LEN

public static final int AR_ALERT_MSG_TOTAL_LEN
Constants holding definitions for alert message items

See Also:
Constant Field Values

AR_ALERT_MSG_SERVER_VERSION

public static final int AR_ALERT_MSG_SERVER_VERSION
See Also:
Constant Field Values

AR_ALERT_MSG_TIMESTAMP

public static final int AR_ALERT_MSG_TIMESTAMP
See Also:
Constant Field Values

AR_ALERT_MSG_TYPE_CODE

public static final int AR_ALERT_MSG_TYPE_CODE
See Also:
Constant Field Values

AR_ALERT_MSG_PRIORITY

public static final int AR_ALERT_MSG_PRIORITY
See Also:
Constant Field Values

AR_ALERT_MSG_TEXT_LEN

public static final int AR_ALERT_MSG_TEXT_LEN
See Also:
Constant Field Values

AR_ALERT_MSG_TEXT

public static final int AR_ALERT_MSG_TEXT
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_LEN

public static final int AR_ALERT_MSG_SOURCE_LEN
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE

public static final int AR_ALERT_MSG_SOURCE
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_SERVER_LEN

public static final int AR_ALERT_MSG_SOURCE_SERVER_LEN
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_SERVER

public static final int AR_ALERT_MSG_SOURCE_SERVER
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_FORM_LEN

public static final int AR_ALERT_MSG_SOURCE_FORM_LEN
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_FORM

public static final int AR_ALERT_MSG_SOURCE_FORM
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_OBJECT_LEN

public static final int AR_ALERT_MSG_SOURCE_OBJECT_LEN
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_OBJECT

public static final int AR_ALERT_MSG_SOURCE_OBJECT
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_SVR_ADDR_LEN

public static final int AR_ALERT_MSG_SOURCE_SVR_ADDR_LEN
See Also:
Constant Field Values

AR_ALERT_MSG_SOURCE_SVR_ADDR

public static final int AR_ALERT_MSG_SOURCE_SVR_ADDR
See Also:
Constant Field Values

AR_ALERT_MSG_ITEM_COUNT

public static final int AR_ALERT_MSG_ITEM_COUNT
See Also:
Constant Field Values

AR_ALERT_MSG_ITEM_COUNT_V1

public static final int AR_ALERT_MSG_ITEM_COUNT_V1
See Also:
Constant Field Values

AR_ALERT_MSG_PROTOCOL_VERSION

public static final int AR_ALERT_MSG_PROTOCOL_VERSION
See Also:
Constant Field Values

AR_ALERT_SOURCE_GP

public static final int AR_ALERT_SOURCE_GP
See Also:
Constant Field Values

AR_ALERT_SOURCE_AR

public static final int AR_ALERT_SOURCE_AR
See Also:
Constant Field Values

AR_ALERT_SOURCE_FIRST

public static final int AR_ALERT_SOURCE_FIRST
See Also:
Constant Field Values

AR_ALERT_SOURCE_CHECK

public static final int AR_ALERT_SOURCE_CHECK
See Also:
Constant Field Values

AR_ALERT_SOURCE_FB

public static final int AR_ALERT_SOURCE_FB
See Also:
Constant Field Values

AR_ALERT_ACK

public static final String AR_ALERT_ACK
See Also:
Constant Field Values

AR_ALERT_MSG_SEPARATOR

public static final String AR_ALERT_MSG_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

AlertMessageInfo

public AlertMessageInfo()
Default constructor


AlertMessageInfo

public AlertMessageInfo(Timestamp time,
                        int type,
                        int prior,
                        String text,
                        String tag,
                        String svrName,
                        String form,
                        String id)

AlertMessageInfo

public AlertMessageInfo(Timestamp time,
                        int type,
                        int prior,
                        String text,
                        String tag,
                        String svrName,
                        String svrAddr,
                        String form,
                        String id)
Method Detail

getTimestamp

public Timestamp getTimestamp()
Returns the timestamp when the alert was created.


getSourceType

public int getSourceType()
Returns value identifying the source of the alert. If you do not want the sourceType returned, specify NULL for this parameter. Possible values are:


getPriority

public int getPriority()
Returns the priority of the alert, for informational purposes only. The range of acceptable values is 0 to 10. If you do not want the priority returned, specify NULL for this parameter.


getAlertText

public String getAlertText()
Returns the text of the alert. If you do not want the alertText returned, specify NULL for this parameter.


getSourceTag

public String getSourceTag()
Returns a string identifying the source of the alert. If you do not want the sourceTag returned, specify NULL for this parameter.


getServerName

public String getServerName()
Returns the name of the server where the alert was generated from. A value of @ indicates the current server. If you do not want the serverName returned, specify NULL for this parameter.


getServerAddr

public String getServerAddr()
Returns the IP address of the server where the alert was generated from. If you do not want the serverAddr returned, specify NULL for this parameter.


getFormName

public String getFormName()
For AR System, returns the name of the form where the alert was generated from. For Flashboards, returns the name of the flashboard that generated the alert. If you do not want the formName returned, specify NULL for this parameter.


getObjectId

public String getObjectId()
Returns ID of the object of the alert.


toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class Object

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
returns the hash code for this instance

equals

public boolean equals(Object obj)
Use this method for checking equality between the current object and the provided one. The result is true only if the argument is not null, is of the same type and represents the same content.

Overrides:
equals in class Object
Parameters:
obj - the object that we are comparing to
Returns:
returns a boolean that tells if the two objects equal

DecodeAlertMessage

public static AlertMessageInfo DecodeAlertMessage(AlertMessageCriteria criteria,
                                                  Object message,
                                                  int len)
                                           throws ARException
Throws:
ARException

AR System Java API

? Copyright 2006, 2007 BMC Software, Inc.