Package org.jboss.soa.esb.actions

Examples of org.jboss.soa.esb.actions.AggregationDetails


            }
        }
    }

    protected void addAggregationDetails(Message message, String uuId, int recipientCount, long seriesTimestamp, int messageIndex) {
        AggregationDetails aggrDetails = new AggregationDetails(uuId, messageIndex, recipientCount, seriesTimestamp);
        ArrayList<String> aggregatorTags;
       
        if(aggregatorOnProperties) {
          aggregatorTags = (ArrayList<String>) message.getProperties().getProperty(Aggregator.AGGEGRATOR_TAG);
        } else {
          aggregatorTags = (ArrayList<String>) message.getContext().getContext(Aggregator.AGGEGRATOR_TAG);
        }

        // This is useful during aggregation - as a way of id'ing where the split occurred.
        aggrDetails.setSplitId(splitId);

        if ((aggregatorTags == null) || !aggregatorOnProperties) {
            if (aggregatorTags == null) {
                aggregatorTags = new ArrayList<String>();
            } else {
                aggregatorTags = new ArrayList<String>(aggregatorTags) ;
            }
           
            if(aggregatorOnProperties) {
              message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
            } else {
              message.getContext().setContext(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
            }
        }

        if(messageIndex > 1) {
            // remove the tag string for the last recipient...
            aggregatorTags.remove(aggregatorTags.size() - 1);
        }
        aggregatorTags.add(aggrDetails.toString());

        if (logger.isDebugEnabled()) {
            logger.debug(Aggregator. AGGEGRATOR_TAG + "=" + aggrDetails);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.actions.AggregationDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.