public class Aggregation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AGGR_APPEND |
static int |
AGGR_AVG |
static int |
AGGR_COUNT |
static int |
AGGR_END |
static int |
AGGR_FIRST |
static int |
AGGR_JOIN |
static int |
AGGR_LAST |
static int |
AGGR_MAX |
static int |
AGGR_MERGE |
static int |
AGGR_MIN |
static int |
AGGR_NONE |
static int |
AGGR_STD |
static int |
AGGR_SUM |
static int |
AGGR_UNION |
static int |
AGGR_XUNION |
Constructor and Description |
---|
Aggregation(java.lang.String name,
java.util.List list) |
Modifier and Type | Method and Description |
---|---|
int |
aggregate(long currentTime,
Event event,
TextEvent msg)
It aggregates the incoming event with the aggregation message
according to the aggregation options.
|
int |
aggregate(long currentTime,
javax.jms.Message inMessage,
javax.jms.Message msg)
It aggregates the incoming message with the aggregation message
according to the aggregation options.
|
Browser |
browser() |
void |
clear() |
void |
clearBodyMap()
clears the bodyMap
|
int |
compare(int i,
javax.jms.Message inMessage,
javax.jms.Message msg)
It compares the value of the i-th property between the incoming message
and the cached message to determine whose message body will be cached.
|
boolean |
containsKey(java.lang.String key) |
java.lang.String |
displayList(java.lang.String indent)
returns a text with all aggregate actions
|
protected void |
finalize() |
int |
getBodyDataType()
returns data type for body
|
int |
getBodyOperation()
returns aggregation id for body
|
int |
getBodyType()
returns result type for body
|
java.lang.Object |
getFromBody(java.lang.String key)
returns the object stored in the body map for the key
|
java.lang.String |
getKey(int id) |
java.lang.String |
getName() |
int |
getSize() |
boolean |
hasBody()
returns true if body aggregation map is NOT empty
|
boolean |
hasKeyInBody(java.lang.String key)
returns true if body aggregation Map contains the key
|
int |
initCache(org.w3c.dom.Document doc,
java.util.Map map) |
int |
initCache(java.util.Map map) |
int |
initialize(long currentTime,
Event event,
TextEvent msg)
It initializes the aggregation event and aggregates the fisrt incoming
event according to the aggregation operations.
|
int |
initialize(long currentTime,
javax.jms.Message inMessage,
javax.jms.Message msg)
It initializes the aggregation message and aggregates the fisrt incoming
message according to the aggregation operations.
|
int |
merge(java.io.Reader sr,
org.w3c.dom.Document doc,
javax.xml.parsers.DocumentBuilder builder)
merges the xml content from the given reader to the xml doc and
returns number of objects merged or -1 for failure
|
int |
merge(java.io.Reader sr,
java.lang.String key,
java.util.Map map)
merges the json content from the given reader to the parsed json map
and returns 1 for success, 0 for empty source and -1 for failure
|
int |
rollback(long currentTime,
javax.jms.Message inMessage,
javax.jms.Message msg)
not implemented yet
|
java.util.Map |
setBodyMap(java.util.Map map)
sets the body map and returns the old one
|
int |
union(java.io.Reader sr,
org.w3c.dom.Document doc,
javax.xml.parsers.DocumentBuilder builder,
java.util.Map map)
unions the xml content from the given reader to the parsed xml doc
and returns 1 for success, 0 for empty source and -1 for failure
|
int |
union(java.io.Reader sr,
java.util.Map map)
unions the json content from the given reader to the parsed json map
and returns 1 for success, 0 for empty source and -1 for failure
|
public static final int AGGR_NONE
public static final int AGGR_COUNT
public static final int AGGR_SUM
public static final int AGGR_MIN
public static final int AGGR_MAX
public static final int AGGR_APPEND
public static final int AGGR_FIRST
public static final int AGGR_LAST
public static final int AGGR_AVG
public static final int AGGR_STD
public static final int AGGR_MERGE
public static final int AGGR_UNION
public static final int AGGR_XUNION
public static final int AGGR_JOIN
public static final int AGGR_END
public int initialize(long currentTime, Event event, TextEvent msg)
public int aggregate(long currentTime, Event event, TextEvent msg)
public int rollback(long currentTime, javax.jms.Message inMessage, javax.jms.Message msg)
public int initialize(long currentTime, javax.jms.Message inMessage, javax.jms.Message msg) throws javax.jms.JMSException
javax.jms.JMSException
public int aggregate(long currentTime, javax.jms.Message inMessage, javax.jms.Message msg) throws javax.jms.JMSException
javax.jms.JMSException
public int compare(int i, javax.jms.Message inMessage, javax.jms.Message msg)
public java.lang.String getName()
public int getSize()
public boolean containsKey(java.lang.String key)
public java.lang.String getKey(int id)
public Browser browser()
public boolean hasBody()
public boolean hasKeyInBody(java.lang.String key)
public java.lang.Object getFromBody(java.lang.String key)
public int getBodyOperation()
public int getBodyType()
public int getBodyDataType()
public java.util.Map setBodyMap(java.util.Map map)
public void clearBodyMap()
public int merge(java.io.Reader sr, org.w3c.dom.Document doc, javax.xml.parsers.DocumentBuilder builder) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.xpath.XPathExpressionException
java.io.IOException
org.xml.sax.SAXException
javax.xml.xpath.XPathExpressionException
public int merge(java.io.Reader sr, java.lang.String key, java.util.Map map) throws java.io.IOException
java.io.IOException
public int union(java.io.Reader sr, org.w3c.dom.Document doc, javax.xml.parsers.DocumentBuilder builder, java.util.Map map) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.xpath.XPathExpressionException
java.io.IOException
org.xml.sax.SAXException
javax.xml.xpath.XPathExpressionException
public int union(java.io.Reader sr, java.util.Map map) throws java.io.IOException
java.io.IOException
public int initCache(org.w3c.dom.Document doc, java.util.Map map) throws java.io.IOException, javax.xml.xpath.XPathExpressionException
java.io.IOException
javax.xml.xpath.XPathExpressionException
public int initCache(java.util.Map map) throws java.io.IOException
java.io.IOException
public java.lang.String displayList(java.lang.String indent)
public void clear()
protected void finalize()
finalize
in class java.lang.Object