recordCustomMessage Method

Creates a Custom Message for the Listener to send to all connected Managers.

Important: In Content Cortex 4.0.0 and later, a pre-defined constant value may be specified to indicate whether the content of the message is informational only, a warning, or of a more critical nature. Although a critical level may be specified, IBM® System Dashboard for Enterprise Content Management does not attempt to assign meaning to the Custom Message; it is considered to be application-specific. For more information, see Recording Custom Messages

Syntax

void recordCustomMessage(String message, [optional] int criticality);

Parameters

message
[in] Required String, which provides the text of the Custom Message. The string may be passed as Unicode that contains any printable characters, excluding the newline character.
criticality
[in] Optional int value, a pre-defined constant value which specifies whether the content of the message is informational only, a warning, or of a more critical nature. The following values are supported:
  • INFO
  • WARNING
  • CRITICAL
  • FATAL

Each constant is defined as a public static final int value. Prior to 4.0.0, all Custom Messages were automatically considered to be at the INFO critical level. To allow for compatibility with earlier versions, when no critical level is specified, the INFO level is automatically assigned.

Example

Listener listener = new Listener("sampleApp", "4.0");
listener.recordCustomMessage("This is a Custom Message.");
   - or -
Listener listener = new Listener("sampleApp", "4.0");
listener.recordCustomMessage("This is a Warning Message.", WARNING);
...

See Also