PreCache NetInjector Documentation Center : PreCache NetInjector API Reference

Java Classes

   







CtrlNotification

— notifications for internal events


CtrlNotification delivers notifications for internal events such as an asynchronous exception or subscription confirmations.

Control notifications have a fixed attribute configuration for name, message, and level.

name —
PC_STRING

message —
PC_STRING

level —
PC_LONG

CtrlNotification inherits all the Notification class functionality.

Hierarchy

java.lang.Object

--> com.precache.event. Notification

      --> com.precache.event.CtrlNotification

Level attribute values

PC_INFO_LEVEL

The control notification has three attributes: name, message, and level. The level attribute has three possible values: 0 = PC_INFO_LEVEL; 1 = PC_CTRL_LEVEL; 2 = PC_ERROR_LEVEL.

public static final int PC_INFO_LEVEL

PC_INFO_LEVEL control notifications deliver status updates and debugging information. They do not play an active role in API usage; their delivery should not affect the behavior of an application.

PC_CTRL_LEVEL

public static final int PC_CTRL_LEVEL

PC_CTRL_LEVEL control notifications report asynchronous system events that might be relevant for application behavior. Applications should handle such events in order to rely on a deterministic behavior.

PC_ERROR_LEVEL

public static final int PC_ERROR_LEVEL

PC_ERROR_LEVEL notifies the application of the occurrence of a critical asynchronous event such us an unhandled exception thrown by an internal Proxy thread.

Note: Failure to handle PC_ERROR_LEVEL triggers program termination.

Methods

GetName

public string GetName()

GetName retrieves the value of the name attribute of the control notification.

GetMessage

public string GetMessage()

GetMessage retrieves the value of the message attribute of the control notification.

GetLevel

public int GetLevel()

GetLevel retrieves the value of the level attribute of the control notification. The possible values passed are:

0 —
PC_INFO_LEVEL

1 —
PC_CTRL_LEVEL

2 —
PC_ERROR_LEVEL

SetName

public void SetName(string szName)

SetName changes the value of the name attribute of the control notification.

SetMessage

public void SetMessage(string szMessage)

SetMessage changes the content of the message attribute of the control notification.

SetLevel

public void SetLevel(int unLevel)

SetLevel changes the severity level of the level attribute of the control notification.