cdev.dir
Interface DeviceMessage


public interface DeviceMessage
extends DirectoryItem

Interface DeviceMessage for messages involving a device.

A DeviceMessage object is created by DirectoryService#getDeviceMessage(messageLevel, messageNumber) in the DirectoryService class.

A DeviceMessage can hold information about the state of a device, for display by the program or for sending to related programs or alarm collectors. A message can contain all or part of the following information:

The superclass DirectoryItem defines methods getName that returns the symbolic name of the message and getDescription that returns shortMessage.

General documentation in DirectoryService .


Method Summary
 java.lang.String getCategory()
          Gets the message category.
 java.lang.String getLabel()
          Gets the one-word message label.
 int getLevel()
          Gets the message level, indicating nature and priority of the message.
 java.lang.String getLongMessage()
          Gets the full text of the message, if any, from the database.
 int getNumber()
          Gets the number that identifies the message for the level.
 java.lang.String getShortMessage()
          Gets the one-line message string.
 boolean isLongMessage()
          True when message text is available in the database.
 
Methods inherited from interface cdev.dir.DirectoryItem
getDescription, getInfo, getInfoLines, getInfoWidth, getName, getServiceName, toString
 

Method Detail

getLabel

public java.lang.String getLabel()
Gets the one-word message label.
Returns:
one-word message label or else the string: "-"

getCategory

public java.lang.String getCategory()
Gets the message category. This indicates the meaning of some messages. Some conventions on standard categories (like "COMMUNICATIONERROR") are needed.
Returns:
message category or else the string: "-"

getLevel

public int getLevel()
Gets the message level, indicating nature and priority of the message.
Returns:
the message level.

getNumber

public int getNumber()
Gets the number that identifies the message for the level.
Returns:
the message number.

getShortMessage

public java.lang.String getShortMessage()
Gets the one-line message string.
Returns:
the one-line message string or else the string: "-".

getLongMessage

public java.lang.String getLongMessage()
                                throws NoSuchDataException
Gets the full text of the message, if any, from the database.
Returns:
the multiline message string.
Throws:
NoSuchDataException - a multiline message is not available

isLongMessage

public boolean isLongMessage()
True when message text is available in the database. This is a test to avoid the exception in getLongMessage.
Returns:
true if message text available