|
PreCache NetInjector Documentation Center : PreCache NetInjector API Reference Java Classes |
|
|
|
Notification the data for an event to be published A Notification object stores information about a single event that is to be published over a channel. The object stores the event's subject and the attribute values for the associated channel. Hierarchy java.lang.Object --> com.precache.event.Notification
The lack of unsigned types in Java requires a policy for the mapping between Java types and the actual types of predefined attributes as determined by a channel notification type. For adding discretionary attributes, the attribute type selected is the closest equivalent of the Java type used (e.g., attribute type PC_FLOAT has been selected for Java type float). For getting discretionary attributes, a single method is provided, which returns the value in an Object whose true class depends on the actual type of the retrieved attribute. Constructors Notification(Proxy p, string subject) public Notification( Proxy p, string subject) Constructs a Notification object with a partiucular subject string and associates this notification with a proxy.
Notification (Proxy p, string subject, string attrvals) public Notification( Proxy p, string subject, string attrvals) Constructs a Notification object with a partiucular subject string and attribute assignments and associates this notification with a Proxy.
Methods Notification inherits clone, equals, getClass, hashCode, notify, notifyAll, toString, and wait from class java.lang.Object finalize public void finalize() Frees up resources associated with this object. subject public string subject() subjectMapping public int[] subjectMapping() public void print() Prints a text rendering of this object's contents on the standard output stream. setPredefinedAttr by name public void setPredefinedAttr(string name,type val) Sets the value of a specified attribute of the notification, identified by its name.
As delineated below, this method is overloaded on all allowed types for parameter val. setPredefinedAttr(string name,char val) setPredefinedAttr(string name,short val) setPredefinedAttr(string name,int val) setPredefinedAttr(string name,long val) setPredefinedAttr(string name,float val) setPredefinedAttr(string name,double val) setPredefinedAttr(string name,boolean val) setPredefinedAttr(string name,string val) setPredefinedAttr(string name,char[] val) setPredefinedAttr(string name,short[] val) setPredefinedAttr(string name,int[] val) setPredefinedAttr(string name,long[] val) setPredefinedAttr(string name,float[] val) setPredefinedAttr(string name,double[] val) setPredefinedAttr(string name,boolean[] val) setPredefinedAttr(string name,byte[] val) setPredefinedAttr by position public void setPredefinedAttr(int pos,type val) Sets the value of a specified attribute of the notification, identified by its position. Note: The position of an attribute is determined by the sequence of attributes set when the channel was configured by the NetInjector administrator.
As delineated below, this method is overloaded on all allowed types for parameter val. setPredefinedAttr(int pos,short val) setPredefinedAttr(int pos,int val) setPredefinedAttr(int pos,long val) setPredefinedAttr(int pos,float val) setPredefinedAttr(int pos,double val) setPredefinedAttr(int pos,boolean val) setPredefinedAttr(int pos,string val) setPredefinedAttr(int pos,char[] val) setPredefinedAttr(int pos,short[] val) setPredefinedAttr(int pos,int[] val) setPredefinedAttr(int pos,long[] val) setPredefinedAttr(int pos,float[] val) setPredefinedAttr(int pos,double[] val) setPredefinedAttr(int pos,boolean[] val) setPredefinedAttr(int pos,byte[] val) getPredefinedAttrTYPE by name public type getPredefinedAttrRETURN_TYPE(string name) Retrieves the value of a specified attribute of the notification, identified by its name.
getPredefinedAttrChar is replicated on all allowed data types, with the TYPE forming the suffix of the method name. char getPredefinedAttrChar(string name) short getPredefinedAttrShort(string name) int getPredefinedAttrInt(string name) long getPredefinedAttrLong(string name) float getPredefinedAttrFloat(string name) double getPredefinedAttrDouble(string name) boolean getPredefinedAttrBoolean(string name) string getPredefinedAttrString(string name) char[] getPredefinedAttrCharArray(string name) short[] getPredefinedAttrShortArray(string name) int[] getPredefinedAttrIntArray(string name) long[] getPredefinedAttrLongArray(string name) float[] getPredefinedAttrFloatArray(string name) double[] getPredefinedAttrDoubleArray(string name) boolean[] getPredefinedAttrBooleanArray(string name) byte[] getPredefinedAttrByteArray(string name) getPredefinedAttrTYPE by position public type getPredefinedAttrTYPE(int pos) Retrieves the value of a specified attribute of the notification, identified by its position. Note: The position of an attribute is determined by the sequence of attributes set when the channel was configured by the NetInjector administrator.
getPredefinedAttrTYPE is replicated on all allowed return types, with the TYPE forming the suffix of the method name. short getPredefinedAttrShort(int pos) int getPredefinedAttrInt(int pos) long getPredefinedAttrLong(int pos) float getPredefinedAttrFloat(int pos) double getPredefinedAttrDouble(int pos) boolean getPredefinedAttrBoolean(int pos) string getPredefinedAttrString(int pos) char[] getPredefinedAttrCharArray(int pos) short[] getPredefinedAttrShortArray(int pos) int[] getPredefinedAttrIntArray(int pos) long[] getPredefinedAttrLongArray(int pos) float[] getPredefinedAttrFloatArray(int pos) double[] getPredefinedAttrDoubleArray(int pos) boolean[] getPredefinedAttrBooleanArray(int pos) byte[] getPredefinedAttrByteArray(int pos) addDiscretionaryAttr Sets the value of a discretionary attribute of the notification. public void addDiscretionaryAttr(string name,type val)
As delineated below, addDiscretionaryAttr is overloaded on all allowed types for parameter val. addDiscretionaryAttr(string name,char val) addDiscretionaryAttr(string name,short val) addDiscretionaryAttr(string name,int val) addDiscretionaryAttr(string name,long val) addDiscretionaryAttr(string name,float val) addDiscretionaryAttr(string name,double val) addDiscretionaryAttr(string name,boolean val) addDiscretionaryAttr(string name,string val) addDiscretionaryAttr(string name,char[] val) addDiscretionaryAttr(string name,short[] val) addDiscretionaryAttr(string name,int[] val) addDiscretionaryAttr(string name,long[] val) addDiscretionaryAttr(string name,float[] val) addDiscretionaryAttr(string name,double[] val) addDiscretionaryAttr(string name,boolean[] val) addDiscretionaryAttr(string name,byte[] val) getDiscretionaryAttr public Object getDiscretionaryAttr(string name) Retrieves the value of a discretionary attribute of the notification.
DiscretionaryAttrNames public string[] DiscretionaryAttrNames() Lists all discretionary attributes by name.
isDiscretionaryAttr public boolean isDiscretionaryAttr(string name) Indicates whether the object has a discretionary attribute of a particular name.
|
|