public final class StreamingUtils extends Object
Cursor instances| Modifier and Type | Method and Description |
|---|---|
static Object |
streamingContent(Object value,
CursorProviderFactory cursorProviderFactory,
Event event)
If the
cursorProviderFactory accepts the given value, then the result of invoking
CursorProviderFactory.of(Event, Object) is returned. |
static Event |
withCursoredEvent(Event event,
CheckedFunction<Event,Event> f)
Executes the given function
f considering that the given event might have
a CursorProvider as payload. |
public static Event withCursoredEvent(Event event, CheckedFunction<Event,Event> f) throws org.mule.runtime.api.exception.MuleException
f considering that the given event might have
a CursorProvider as payload. In that case, this method obtains a cursor from the provider
and executes the function.
Closing the opened cursor, handling exceptions and return values are all taken care of by this utility method.
public static Object streamingContent(Object value, CursorProviderFactory cursorProviderFactory, Event event)
cursorProviderFactory accepts the given value, then the result of invoking
CursorProviderFactory.of(Event, Object) is returned. Otherwise, the original value is.value - a value which may be a repeatable streaming resourcecursorProviderFactory - a nullable CursorStreamProviderFactoryevent - the event on which the value was generatedvalue or a CursorProviderCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.