|
Siena (v.1.5.5) API documentation | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectsiena.Notification
public class Notification
an event notification The primary data entity used within Siena. A notification is structured as a set of named and typed attributes. Attribute names are strings.
A valid attribute name must begin with a letter
('a'-'z',
'A'-'Z') or an underscore character
('_'), and may contain only letters, underscores,
digits ('0'-'9'), the dot character
('.'), the forward slash character
('/'), and the dollar sign
('$'). Attribute names must be unique within a
Notification.
Example:
Notification alert = new Notification();
alert.putAttribute("threat", "virus");
alert.putAttribute("name", "melissa");
alert.putAttribute("total_infected", 25);
alert.putAttribute("os/name", "win32");
alert.putAttribute("os/version", "98");
AttributeValue,
Filter,
Siena.publish(Notification),
Serialized Form| Constructor Summary | |
|---|---|
Notification()
constructs an empty notification. |
|
Notification(Notification n)
creates a deep copy of a given notification. |
|
| Method Summary | |
|---|---|
java.util.Iterator |
attributeNamesIterator()
returns an iterator for the set of attribute names of this notification. |
void |
clear()
removes every attribute from this notification. |
AttributeValue |
getAttribute(java.lang.String name)
returns the value of an attribute or null if
that attribute does not exist in this notification. |
java.util.Iterator |
iterator()
Deprecated. as of Siena 1.1.2 |
static Notification |
parseNotification(java.lang.String s)
|
void |
putAttribute(java.lang.String name,
AttributeValue value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
boolean value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
byte[] value)
sets the value of an attribute. |
void |
putAttribute(java.lang.String name,
double value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
long value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
java.lang.String value)
set the value of an attribute. |
AttributeValue |
removeAttribute(java.lang.String name)
remove an attribute from this notification. |
int |
size()
returns the number of attributes in this notification. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Notification()
public Notification(Notification n)
| Method Detail |
|---|
public static Notification parseNotification(java.lang.String s)
throws SENPInvalidFormat
SENPInvalidFormatpublic java.util.Iterator iterator()
public void putAttribute(java.lang.String name,
java.lang.String value)
name - attribute name.value - String value.
public void putAttribute(java.lang.String name,
byte[] value)
name - attribute name.value - byte array value.
public void putAttribute(java.lang.String name,
long value)
name - attribute name.value - integer value.
public void putAttribute(java.lang.String name,
double value)
name - attribute name.value - double value.
public void putAttribute(java.lang.String name,
boolean value)
name - attribute name.value - boolean value.
public void putAttribute(java.lang.String name,
AttributeValue value)
name - attribute name.value - value.public AttributeValue getAttribute(java.lang.String name)
null if
that attribute does not exist in this notification.
name - attribute name.public AttributeValue removeAttribute(java.lang.String name)
name - attribute name.
null if
the given attribute does not exist in this notification.public int size()
public void clear()
public java.util.Iterator attributeNamesIterator()
public java.lang.String toString()
toString in class java.lang.Object
|
Siena (v.1.5.5) API documentation | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||