コード例 #1
0
 protected UMOMessage aggregateEvents(EventGroup events) throws RoutingException {
   StringBuffer newPayload = new StringBuffer();
   UMOEvent event = null;
   for (Iterator iterator = events.getEvents().iterator(); iterator.hasNext(); ) {
     event = (UMOEvent) iterator.next();
     try {
       newPayload.append(event.getMessageAsString()).append(" ");
     } catch (UMOException e) {
       throw new RoutingException(event.getMessage(), event.getEndpoint(), e);
     }
   }
   return new MuleMessage(newPayload.toString(), event.getProperties());
 }
コード例 #2
0
 /**
  * This will dispatch an event asynchronously via the configured outbound endpoint on the
  * component for this session
  *
  * @param message payload to dispatch
  * @throws org.mule.umo.UMOException if there is no outbound endpoint configured on the component
  *     or the events fails during dispatch
  */
 public void dispatchEvent(Object message) throws UMOException {
   session.dispatchEvent(new MuleMessage(message, event.getProperties()));
 }
コード例 #3
0
 /**
  * Returns a map of properties associated with the event
  *
  * @return a map of properties on the event
  */
 public Map getProperties() {
   return event.getProperties();
 }
コード例 #4
0
 /**
  * This will send an event via the configured outbound router on the component
  *
  * @param message the message to send
  * @return the result of the send if any
  * @throws org.mule.umo.UMOException if there is no outbound endpoint configured on the component
  *     or the events fails during dispatch
  */
 public UMOMessage sendEvent(Object message) throws UMOException {
   return sendEvent(new MuleMessage(message, event.getProperties()));
 }