public abstract class AbstractCursorStreamProviderFactory extends Object implements CursorStreamProviderFactory
CursorStreamProviderFactory which contains all the base behaviour and template
methods.
It interacts with the CursorManager in order to track all allocated resources and make
sure they're properly disposed of once they're no longer necessary.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCursorStreamProviderFactory(ByteBufferManager bufferManager,
StreamingManager streamingManager)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected ByteBufferManager |
getBufferManager() |
Object |
of(Event event,
InputStream inputStream)
Optionally creates a new
CursorProvider to buffer the given value. |
protected abstract Object |
resolve(InputStream inputStream,
Event event)
Implementations should use this method to actually create the output value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacceptsprotected AbstractCursorStreamProviderFactory(ByteBufferManager bufferManager, StreamingManager streamingManager)
bufferManager - the ByteBufferManager that will be used to allocate all bufferspublic final Object of(Event event, InputStream inputStream)
CursorProvider to buffer the given value.
Implementations might resolve that the given stream is/should not be buffered and thus it will return the same given stream. In that case, the stream will be unaltered.
of in interface CursorProviderFactory<InputStream>event - the event on which buffering is talking placeinputStream - the stream to be cursoredCursorProvider or the same given inputStreamprotected ByteBufferManager getBufferManager()
ByteBufferManager that MUST to be used to allocate byte buffersprotected abstract Object resolve(InputStream inputStream, Event event)
inputStream - event - Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.