org.mule.streaming.processor
Class AbstractDevkitBasedPageableMessageProcessor
java.lang.Object
org.mule.devkit.processor.ExpressionEvaluatorSupport
org.mule.devkit.processor.DevkitBasedMessageProcessor
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
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 |
AbstractDevkitBasedPageableMessageProcessor
public AbstractDevkitBasedPageableMessageProcessor(String operationName)
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 eventpagingConfiguration
- paging configuration parameters
- Returns:
- a not null
PagingDelegate
- Throws:
Exception
setFetchSize
public void setFetchSize(String fetchSize)
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.