public class MAdvisoryDocument extends MRegistryObjectWithProperties
When an application sends a message to another, it could send pure data. In many cases, however, it is useful to include context for the data. This context allows the receiving and sending application to share information that is not necessarily part of the data.
Typically, the application itself defines the context, however, that means that each sending and receiving application have to agree on the format for the context.
The MAdvisoryDocument
class encapsulates context information
so that applications can previously define what context is expected,
then share that context.
This class is most useful for debugging and performance analysis. The class allows applications to include information about the structure and other aspects of the data that is sent.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
M_AD_ANALYSIS |
static java.lang.String |
M_AD_APPLICATION_CONTEXT |
static java.lang.String |
M_AD_APPLICATION_ID |
static java.lang.String |
M_AD_APPLICATION_INSTANCE_ID |
static java.lang.String |
M_AD_CLASS |
static java.lang.String |
M_AD_COMPONENT_ID |
static java.lang.String |
M_AD_DATA |
static java.lang.String |
M_AD_DATE_TIME_STAMP |
static java.lang.String |
M_AD_DESCRIPTION |
static java.lang.String |
M_AD_NAME |
static java.lang.String |
M_AD_REFERENCE_ID |
static java.lang.String |
M_AD_SEVERITY |
static java.lang.String |
M_AD_SUBJECT |
static java.lang.String |
M_AD_VERSION |
static java.lang.String |
M_ADVISORY_DOCUMENT |
static int |
M_Error |
static int |
M_Fatal |
static int |
M_Info |
static int |
M_Warn |
Constructor and Description |
---|
MAdvisoryDocument(MClassRegistry reg)
Construct an empty
MAdvisoryDocument . |
MAdvisoryDocument(MClassRegistry reg,
MTree data)
Deserialize a previously serialized
MAdvisoryDocument
that is specified by the mt argument. |
MAdvisoryDocument(MClassRegistry reg,
java.lang.String className)
Create an
MAdvisoryDocument with the specified name. |
MAdvisoryDocument(MInstance instance) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(MAdvisoryDocument adv) |
java.lang.String |
getAdvClass()
Retrieve the advisory class such as
APPLICATION , SYSTEM , and so on. |
java.lang.String |
getAnalysis()
Return supplementary information, such as reasons for this advisory or actions to take.
|
java.lang.Object |
getApplicationContext() |
java.lang.String |
getApplicationId()
Return the application that sent this advisory, for example R/3 Adapter or Clarify Adapter.
|
java.lang.String |
getApplicationInstanceId()
Return the instance of the running application instance that sent
this advisory.
|
java.lang.String |
getComponentId()
Return the component ID associated with this advisory.
|
java.lang.Object |
getData()
Return the data included with this advisory.
|
java.util.Date |
getDateTimeStamp()
Return the date and time stamp for this advisory.
|
java.lang.String |
getDescription()
Return the description for this advisory.
|
MInstance |
getInstance() |
java.lang.String |
getName()
Return the name of this advisory.
|
java.lang.String |
getReferenceId()
Return the application-defined reference ID for this advisory.
|
int |
getSeverity()
Return the severity of this advisory.
|
java.lang.String |
getSubject()
Return the subject of the message that triggered this advisory.
|
MTrackingInfo |
getTrackingInfo() |
int |
getVersion()
Return the version of this advisory.
|
MTree |
serialize()
Serialize this
MAdvisoryDocument instance for network transmission. |
MTree |
serialize(int formatHint)
Serialize this
MAdvisoryDocument instance for network transmission. |
void |
setAdvClass(java.lang.String advClass)
Set the advisory class, for example
APPLICATION or SYSTEM . |
void |
setAnalysis(java.lang.String analysis)
Set supplementary information such as reasons for this advisory and possible workarounds.
|
void |
setApplicationContext(java.lang.Object rData) |
void |
setApplicationId(java.lang.String applicationID)
Set the application ID, for example R/3 Adapter or Clarify Adapter
of the advisory message source.
|
void |
setApplicationInstanceId(java.lang.String applicationInstanceID)
Set the instance ID of this application, which identifies the running
instance.
|
void |
setComponentId(java.lang.String componentID)
Set the component ID for this advisory.
|
void |
setData(java.lang.Object data)
Set the data associated with this
MAdvisoryDocument instance. |
void |
setDateTimeStamp(java.util.Date datetime)
Set the date and time stamp associated with this advisory document.
|
void |
setDescription(java.lang.String description)
Set the advisory description.
|
void |
setName(java.lang.String name)
Set the name of the advisory message instance.
|
void |
setReferenceId(java.lang.String referenceID)
Set a unique ID for this
MAdvisoryDocument . |
void |
setSeverity(int severity)
Set the severity of this advisory.
|
void |
setSubject(java.lang.String subject)
Set the subject name of the original data that triggered the advisory.
|
void |
setTrackingInfo(MTrackingInfo p_trackingInfo) |
void |
setVersion(int version)
Set the version information for this
MAdvisoryDocument . |
java.lang.String |
toString() |
addProperty, getProperties, getProperty, getPropertyCount, getPropertyNames, getRegistry, isOK, isOK
public static final java.lang.String M_ADVISORY_DOCUMENT
public static final java.lang.String M_AD_NAME
public static final java.lang.String M_AD_CLASS
public static final java.lang.String M_AD_VERSION
public static final java.lang.String M_AD_SEVERITY
public static final java.lang.String M_AD_DATE_TIME_STAMP
public static final java.lang.String M_AD_APPLICATION_ID
public static final java.lang.String M_AD_APPLICATION_INSTANCE_ID
public static final java.lang.String M_AD_DESCRIPTION
public static final java.lang.String M_AD_ANALYSIS
public static final java.lang.String M_AD_SUBJECT
public static final java.lang.String M_AD_DATA
public static final java.lang.String M_AD_REFERENCE_ID
public static final java.lang.String M_AD_COMPONENT_ID
public static final java.lang.String M_AD_APPLICATION_CONTEXT
public static final int M_Info
public static final int M_Warn
public static final int M_Error
public static final int M_Fatal
public MAdvisoryDocument(MClassRegistry reg)
MAdvisoryDocument
.reg
- Class registry in which this MAdvisoryDocument is being created.public MAdvisoryDocument(MClassRegistry reg, java.lang.String className)
MAdvisoryDocument
with the specified name.reg
- Class registry in which this MAdvisoryDocument
is being created.className
- Name of the class that describes this
MAdvisoryDocument
. This must always be the full
TIBCO Repository name (that is, /tibco/public/class/ae/...
)public MAdvisoryDocument(MClassRegistry reg, MTree data)
MAdvisoryDocument
that is specified by the mt
argument.reg
- Class registry in which this MAdvisoryDocument
is being created.data
- MTree
representing a previously serialized MAdvisoryDocument.public MAdvisoryDocument(MInstance instance)
public void setName(java.lang.String name) throws MException
MException
public void setAdvClass(java.lang.String advClass) throws MException
APPLICATION
or SYSTEM
.MException
public void setVersion(int version) throws MException
MAdvisoryDocument
.MException
public void setApplicationId(java.lang.String applicationID) throws MException
MException
public void setApplicationInstanceId(java.lang.String applicationInstanceID) throws MException
MException
public void setApplicationContext(java.lang.Object rData) throws MException
MException
public void setSeverity(int severity) throws MException
M_Info
,
M_Warn
, M_Error
, M_Fatal.MException
public void setDescription(java.lang.String description) throws MException
MException
public void setAnalysis(java.lang.String analysis) throws MException
MException
public void setDateTimeStamp(java.util.Date datetime) throws MException
MException
public void setSubject(java.lang.String subject) throws MException
MException
public void setReferenceId(java.lang.String referenceID) throws MException
MAdvisoryDocument
.MException
public void setComponentId(java.lang.String componentID) throws MException
MException
public void setData(java.lang.Object data) throws MException
MAdvisoryDocument
instance.MException
public java.lang.String getName() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.String getComponentId() throws MException
MException
- if the named attribute is not defined for this instance.public int getVersion() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.String getReferenceId() throws MException
MException
- if the named attribute is not defined for this instance.public java.util.Date getDateTimeStamp() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.String getAdvClass() throws MException
APPLICATION
, SYSTEM
, and so on.MException
- if the named attribute is not defined for this instance.public java.lang.String getApplicationId() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.Object getApplicationContext() throws MException
MException
public java.lang.String getApplicationInstanceId() throws MException
pid
is the process ID and host is the name of the host where the message came from.MException
- if the named attribute is not defined for this instance.public int getSeverity() throws MException
M_Info
,
M_Warn
, M_Error
, M_Fatal.MException
- if the named attribute is not defined for this instance.public java.lang.String getDescription() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.String getAnalysis() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.String getSubject() throws MException
MException
- if the named attribute is not defined for this instance.public java.lang.Object getData() throws MException
MException
- if the named attribute is not defined for this instance.public MTree serialize() throws MException
MAdvisoryDocument
instance for network transmission.MException
public MTree serialize(int formatHint) throws MException
MAdvisoryDocument
instance for network transmission.formatHint
- Required parameter specifying the message format.
Valid message format values are
MMessageFormat.AERV
- for AERv message format
MMessageFormat.XMLJMS
- for JMS XML message format
MMessageFormat.XMLRV
- for RV XML message formatMException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(MAdvisoryDocument adv)
public MInstance getInstance()
public void setTrackingInfo(MTrackingInfo p_trackingInfo)
public MTrackingInfo getTrackingInfo()