public class SplitAggregator extends AbstractAggregator
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SplitAggregator.SplitterAggregation |
AbstractAggregator.ClosedAggregateException| Modifier and Type | Field and Description |
|---|---|
protected javax.xml.namespace.QName |
aggregateElementName |
protected org.apache.servicemix.expression.Expression |
corrId |
protected org.apache.servicemix.expression.Expression |
count |
protected java.lang.String |
countAttribute |
protected org.apache.servicemix.expression.Expression |
index |
protected java.lang.String |
indexAttribute |
protected javax.xml.namespace.QName |
messageElementName |
protected long |
timeout |
lockManager, store, storeFactory, timerManager, wsdlExchangeTarget, wsdlResourcedefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
SplitAggregator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMessage(java.lang.Object aggregation,
javax.jbi.messaging.NormalizedMessage message,
javax.jbi.messaging.MessageExchange exchange)
Add a newly received message to this aggregation
|
void |
buildAggregate(java.lang.Object aggregation,
javax.jbi.messaging.NormalizedMessage message,
javax.jbi.messaging.MessageExchange exchange,
boolean doTimeout)
Fill the given JBI message with the aggregation result.
|
java.lang.Object |
createAggregation(java.lang.String correlationID)
Creates a new empty aggregation.
|
protected org.w3c.dom.Element |
createChildElement(javax.xml.namespace.QName name,
org.w3c.dom.Node parent) |
javax.xml.namespace.QName |
getAggregateElementName() |
java.lang.String |
getCorrelationID(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
Retrieve the correlation ID of the given exchange
|
org.apache.servicemix.expression.Expression |
getCorrId() |
org.apache.servicemix.expression.Expression |
getCount() |
java.lang.String |
getCountAttribute() |
org.apache.servicemix.expression.Expression |
getIndex() |
java.lang.String |
getIndexAttribute() |
javax.xml.namespace.QName |
getMessageElementName() |
long |
getTimeout() |
java.util.Date |
getTimeout(java.lang.Object aggregation)
Returns the date when the onTimeout method should be called if the aggregation is not completed yet,
or null if the aggregation has no timeout.
|
void |
setAggregateElementName(javax.xml.namespace.QName aggregateElementName)
The qualified name that will be used as the root xml element when building the aggregate.
|
void |
setCorrId(org.apache.servicemix.expression.Expression corrId)
An expression used to compute the correlation ids of incoming messages to find
related messages.
|
void |
setCount(org.apache.servicemix.expression.Expression count)
An expression used to compute the total number of message that the aggregate will contain.
|
void |
setCountAttribute(java.lang.String countAttribute)
The name of the xml attribute attached to the root element that will contain the number of
messages in this aggregate.
|
void |
setIndex(org.apache.servicemix.expression.Expression index)
An expression used to compute the index of this message in the aggregate.
|
void |
setIndexAttribute(java.lang.String indexAttribute)
The name of the xml attribute attached to the message element that will contain the index of
messages in this aggregate.
|
void |
setMessageElementName(javax.xml.namespace.QName messageElementName)
The qualified name of the xml element used to embed each message
when building the aggregated message.
|
void |
setTimeout(long timeout)
The maximum amount of time (in milliseconds) that can elapse between messages for a single aggregate.
|
closeAggregation, getClosedAggregatesStoreFactory, getTarget, isAggregationClosed, isCopyAttachments, isCopyProperties, isReportClosedAggregatesAsErrors, isReportErrors, isReportTimeoutAsErrors, isRescheduleTimeouts, isSynchronous, onTimeout, process, processAsync, processSync, sendAggregate, setClosedAggregatesStoreFactory, setCopyAttachments, setCopyProperties, setReportClosedAggregatesAsErrors, setReportErrors, setReportTimeoutAsErrors, setRescheduleTimeouts, setSynchronous, setTarget, startchooseFirstEndpointWithDescriptor, copyAttachments, copyProperties, getDefinition, getDefinitionFromDescription, getDefinitionFromWsdlExchangeTarget, getDefinitionFromWsdlResource, getDescription, getDescriptionForExchangeTarget, getEndpointsForExchangeTarget, getLockManager, getStore, getStoreFactory, getTimerManager, getWsdlExchangeTarget, getWsdlResource, setLockManager, setStore, setStoreFactory, setTimerManager, setWsdlExchangeTarget, setWsdlResource, stopactivate, deactivate, getRole, processInOnly, processInOutdone, fail, getChannel, getContext, getExchangeFactory, send, sendSyncgetEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString, validateprotected org.apache.servicemix.expression.Expression count
protected org.apache.servicemix.expression.Expression index
protected org.apache.servicemix.expression.Expression corrId
protected javax.xml.namespace.QName aggregateElementName
protected javax.xml.namespace.QName messageElementName
protected java.lang.String countAttribute
protected java.lang.String indexAttribute
protected long timeout
public javax.xml.namespace.QName getAggregateElementName()
public void setAggregateElementName(javax.xml.namespace.QName aggregateElementName)
messageElementName property.aggregateElementName - the aggregateElementName to setpublic org.apache.servicemix.expression.Expression getCorrId()
public void setCorrId(org.apache.servicemix.expression.Expression corrId)
corrId - the corrId to setpublic org.apache.servicemix.expression.Expression getCount()
public void setCount(org.apache.servicemix.expression.Expression count)
count - the count to setpublic java.lang.String getCountAttribute()
public void setCountAttribute(java.lang.String countAttribute)
countAttribute - the countAttribute to setpublic org.apache.servicemix.expression.Expression getIndex()
public void setIndex(org.apache.servicemix.expression.Expression index)
0 and count - 1 included.index - the index to setpublic java.lang.String getIndexAttribute()
public void setIndexAttribute(java.lang.String indexAttribute)
indexAttribute - the indexAttribute to setpublic javax.xml.namespace.QName getMessageElementName()
public void setMessageElementName(javax.xml.namespace.QName messageElementName)
null, messages
contents will be appended directly as children of the root element.messageElementName - the messageElementName to setpublic long getTimeout()
public void setTimeout(long timeout)
0 which means that the timeout is not used at all.timeout - the timeout to setpublic java.lang.Object createAggregation(java.lang.String correlationID)
AbstractAggregatorcreateAggregation in class AbstractAggregatorpublic java.lang.String getCorrelationID(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
throws java.lang.Exception
AbstractAggregatorgetCorrelationID in class AbstractAggregatorjava.lang.Exceptionpublic boolean addMessage(java.lang.Object aggregation,
javax.jbi.messaging.NormalizedMessage message,
javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
AbstractAggregatoraddMessage in class AbstractAggregatortrue if the aggregate id completejava.lang.Exceptionpublic void buildAggregate(java.lang.Object aggregation,
javax.jbi.messaging.NormalizedMessage message,
javax.jbi.messaging.MessageExchange exchange,
boolean doTimeout)
throws java.lang.Exception
AbstractAggregatorbuildAggregate in class AbstractAggregatordoTimeout - false if the aggregation has completed or true
if this aggregation has timed outjava.lang.Exceptionprotected org.w3c.dom.Element createChildElement(javax.xml.namespace.QName name,
org.w3c.dom.Node parent)
public java.util.Date getTimeout(java.lang.Object aggregation)
AbstractAggregatorgetTimeout in class AbstractAggregatorCopyright © 2005-2015 FuseSource. All Rights Reserved.