|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.isr.yancees.server.dispatcher.elvin.OldElvinEvent
An event An event is structured as a set of named and typed bodyAttributes. 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
OldElvinEvent
.
Example:
OldElvinEvent alert = new OldElvinEvent();
alert.putAttribute("threat", "virus");
alert.putAttribute("name", "melissa");
alert.putAttribute("total_infected", 25);
alert.putAttribute("os/name", "win32");
alert.putAttribute("os/version", "98");
Field Summary | |
static java.lang.String |
ATTRIBUTE
|
static java.lang.String |
BODY
|
static java.lang.String |
EVENT
Tags used from the event to express siena constraints. |
static java.lang.String |
HEADER
|
static java.lang.String |
NAME
|
static java.lang.String |
TYPE_ATTRIBUTE
|
static java.lang.String |
VALUE
|
Constructor Summary | |
OldElvinEvent()
constructs an empty OldElvinEvent. |
|
OldElvinEvent(EventInterface evt)
initialized the current object using the generic event provided. |
|
OldElvinEvent(org.w3c.dom.Node n)
initialized the current object using the generic event represented in the form of a DOM tree. |
|
OldElvinEvent(OldElvinEvent n)
creates a deep copy of a given OldElvinEvent. |
Method Summary | |
void |
clearAll()
Removes every attribute from this OldElvinEvent. |
void |
clearBody()
removes every body attribute from this OldElvinEvent. |
void |
clearHeader()
Removes every header attribute from this OldElvinEvent. |
AttValue |
getBodyAttribute(java.lang.String name)
returns the value of an attribute or null if
that attribute does not exist in this OldElvinEvent. |
java.util.Iterator |
getBodyAttributeNamesIterator()
Returns an iterator for the set of attribute names of this OldElvinEvent body. |
AttValue[] |
getBodyAttValues()
|
int |
getBodySize()
returns the number of bodyAttributes in this OldElvinEvent. |
java.util.Date |
getDateCreated()
|
java.util.Date |
getDateReceivedInServer()
|
org.w3c.dom.Node |
getDOM()
|
AttValue |
getHeaderAttribute(java.lang.String name)
returns the value of an attribute or null if
that attribute does not exist in this OldElvinEvent. |
java.util.Iterator |
getHeaderAttributeNamesIterator()
returns an iterator for the set of attribute names of this OldElvinEvent header. |
AttValue[] |
getHeaderAttValues()
|
int |
getHeaderSize()
returns the number of headerAttributes in this OldElvinEvent. |
long |
getId()
|
java.lang.String |
getXMLTextContent()
|
void |
putBodyAttribute(java.lang.String name,
AttValue value)
set the value of an attribute. |
void |
putBodyAttribute(java.lang.String name,
boolean value)
set the value of an attribute. |
void |
putBodyAttribute(java.lang.String name,
byte[] value)
sets the value of an attribute. |
void |
putBodyAttribute(java.lang.String name,
double value)
set the value of an attribute. |
void |
putBodyAttribute(java.lang.String name,
long value)
set the value of an attribute. |
void |
putBodyAttribute(java.lang.String name,
java.lang.String value)
set the value of an attribute. |
void |
putHeaderAttribute(java.lang.String name,
AttValue value)
set the value of an attribute. |
void |
putHeaderAttribute(java.lang.String name,
boolean value)
set the value of an attribute. |
void |
putHeaderAttribute(java.lang.String name,
byte[] value)
sets the value of an attribute. |
void |
putHeaderAttribute(java.lang.String name,
double value)
set the value of an attribute. |
void |
putHeaderAttribute(java.lang.String name,
long value)
set the value of an attribute. |
void |
putHeaderAttribute(java.lang.String name,
java.lang.String value)
set the value of an attribute. |
void |
setDOM(org.w3c.dom.Node n)
Changes current event node, parsing it. |
void |
setXMLTextContent(java.lang.String content)
Changes the content of this message. |
int |
size()
returns the number of bodyAttributes in this OldElvinEvent. |
java.lang.String |
toString()
Prints the structure of the evetn using a free notation. |
java.lang.String |
toXML()
Prints the XML hierarchy that represents the current event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String EVENT
public static final java.lang.String BODY
public static final java.lang.String HEADER
public static final java.lang.String NAME
public static final java.lang.String VALUE
public static final java.lang.String ATTRIBUTE
public static final java.lang.String TYPE_ATTRIBUTE
Constructor Detail |
public OldElvinEvent()
public OldElvinEvent(EventInterface evt)
evt
- is an object of type Event which will be narrowed and parsed
according to the OldElvinEvent representation.public OldElvinEvent(org.w3c.dom.Node n) throws ParsingException
public OldElvinEvent(OldElvinEvent n)
Method Detail |
public long getId()
getId
in interface MessageInterface
public void setDOM(org.w3c.dom.Node n) throws ParsingException
setDOM
in interface MessageInterface
n
-
EventParsingException
ParsingException
public org.w3c.dom.Node getDOM()
getDOM
in interface MessageInterface
public AttValue[] getBodyAttValues()
public AttValue[] getHeaderAttValues()
public void putBodyAttribute(java.lang.String name, java.lang.String value)
name
- attribute name.value
- String value.public void putBodyAttribute(java.lang.String name, byte[] value)
name
- attribute name.value
- byte array value.public void putBodyAttribute(java.lang.String name, long value)
name
- attribute name.value
- integer value.public void putBodyAttribute(java.lang.String name, double value)
name
- attribute name.value
- double value.public void putBodyAttribute(java.lang.String name, boolean value)
name
- attribute name.value
- boolean value.public void putBodyAttribute(java.lang.String name, AttValue value)
name
- attribute name.value
- value.public AttValue getBodyAttribute(java.lang.String name)
null
if
that attribute does not exist in this OldElvinEvent.
name
- attribute name.public int getBodySize()
public void putHeaderAttribute(java.lang.String name, java.lang.String value)
name
- attribute name.value
- String value.public void putHeaderAttribute(java.lang.String name, byte[] value)
name
- attribute name.value
- byte array value.public void putHeaderAttribute(java.lang.String name, long value)
name
- attribute name.value
- integer value.public void putHeaderAttribute(java.lang.String name, double value)
name
- attribute name.value
- double value.public void putHeaderAttribute(java.lang.String name, boolean value)
name
- attribute name.value
- boolean value.public void putHeaderAttribute(java.lang.String name, AttValue value)
name
- attribute name.value
- value.public AttValue getHeaderAttribute(java.lang.String name)
null
if
that attribute does not exist in this OldElvinEvent.
name
- attribute name.public int getHeaderSize()
public int size()
public void clearBody()
public void clearHeader()
public void clearAll()
public java.util.Iterator getBodyAttributeNamesIterator()
public java.util.Iterator getHeaderAttributeNamesIterator()
public java.lang.String toString()
public java.lang.String toXML()
public void setXMLTextContent(java.lang.String content)
setXMLTextContent
in interface MessageInterface
content
- is the new XML format contnet in the form of a Stringpublic java.lang.String getXMLTextContent()
getXMLTextContent
in interface MessageInterface
public java.util.Date getDateCreated()
getDateCreated
in interface MessageInterface
public java.util.Date getDateReceivedInServer()
getDateReceivedInServer
in interface MessageInterface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |