org.mule.streaming.processor
Class AbstractDevkitBasedPageableMessageProcessor

java.lang.Object
  extended by org.mule.devkit.processor.ExpressionEvaluatorSupport
      extended by org.mule.devkit.processor.DevkitBasedMessageProcessor
          extended by org.mule.streaming.processor.AbstractDevkitBasedPageableMessageProcessor
All Implemented Interfaces:
FlowConstructAware, MuleContextAware, Disposable, Initialisable, Startable, Stoppable

public abstract class AbstractDevkitBasedPageableMessageProcessor
extends DevkitBasedMessageProcessor

Base class for devkit generated pageable message processors. This processor automatically takes care of obtaining a PagingDelegate and returning a org.mule.streaming.ConsumerIterator.ConsumerIterator accordingly


Field Summary
 
Fields inherited from class org.mule.devkit.processor.DevkitBasedMessageProcessor
flowConstruct, moduleObject, muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Constructor Summary
AbstractDevkitBasedPageableMessageProcessor(String operationName)
           
 
Method Summary
protected  MuleEvent doProcess(MuleEvent event)
          This method sets the message payload to an instance of org.mule.streaming.ConsumerIterator.ConsumerIterator configured accordingly to the configured outputUnit and the PagingDelegate obtained by invoking {@link org.mule.streaming.processor.AbstractDevkitBasedPageableMessageProcessor.
protected abstract  PagingDelegate<?> getPagingDelegate(MuleEvent event, PagingConfiguration pagingConfiguration)
          Implement this method to return the PagingDelegate to be used when paging.
 void setFetchSize(String fetchSize)
           
 
Methods inherited from class org.mule.devkit.processor.DevkitBasedMessageProcessor
dispose, findOrCreate, getAccessTokenId, getFlowConstruct, getMuleContext, initialise, overwritePayload, process, setAccessTokenId, setFlowConstruct, setModuleObject, setMuleContext, start, stop
 
Methods inherited from class org.mule.devkit.processor.ExpressionEvaluatorSupport
computeClassHierarchy, evaluate, evaluateAndTransform, evaluateAndTransform, getAccessTokenId, isAssignableFrom, isList, isListClass, isMap, isMapClass, transform, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDevkitBasedPageableMessageProcessor

public AbstractDevkitBasedPageableMessageProcessor(String operationName)
Method Detail

doProcess

protected final MuleEvent doProcess(MuleEvent event)
                             throws Exception
This method sets the message payload to an instance of org.mule.streaming.ConsumerIterator.ConsumerIterator configured accordingly to the configured outputUnit and the PagingDelegate obtained by invoking getPagingDelegate(MuleEvent, PagingConfiguration)

Specified by:
doProcess in class DevkitBasedMessageProcessor
Parameters:
event - the mule event
Returns:
a MuleEvent
Throws:
IllegalArgumentException - is firstPage is lower than zero or if lastPage is lower than zero and firstPage or if fetchSize is lower than zero
Exception

getPagingDelegate

protected abstract PagingDelegate<?> getPagingDelegate(MuleEvent event,
                                                       PagingConfiguration pagingConfiguration)
                                                throws Exception
Implement this method to return the PagingDelegate to be used when paging. This method should never return null

Parameters:
event - the current mule event
pagingConfiguration - paging configuration parameters
Returns:
a not null PagingDelegate
Throws:
Exception

setFetchSize

public void setFetchSize(String fetchSize)


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.