@NoExtend public class DefaultStreamingManager extends Object implements StreamingManager, Initialisable, Disposable
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
DefaultStreamingManager() |
Modifier and Type | Method and Description |
---|---|
protected ByteStreamingManager |
createByteStreamingManager() |
protected ObjectStreamingManager |
createObjectStreamingManager() |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
ByteStreamingManager |
forBytes() |
ObjectStreamingManager |
forObjects() |
protected ByteBufferManager |
getBufferManager() |
StreamingStatistics |
getStreamingStatistics() |
void |
initialise()
Method used to perform any initialisation work.
|
CursorProvider |
manage(CursorProvider provider,
CoreEvent creatorEvent)
Becomes aware of the given
provider and returns a replacement provider
which is managed by the runtime, allowing for automatic resource handling |
void |
manage(InputStream stream,
CoreEvent creatorEvent)
Becomes aware of the given
inputStream and makes sure it is closed
by the time the given creatorEvent (and all its parent events) are completed. |
public void initialise() throws InitialisationException
InitialisationException
should be thrown.
In case that the Initialisable.initialise()
method execution fails then mule will call the Disposable.dispose()
method if
the class also implements Disposable
allowing the object to dispose any allocated resource during
Initialisable.initialise()
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownDisposable
protected ByteStreamingManager createByteStreamingManager()
protected ObjectStreamingManager createObjectStreamingManager()
public void dispose()
dispose
in interface Disposable
public ByteStreamingManager forBytes()
forBytes
in interface StreamingManager
public ObjectStreamingManager forObjects()
forObjects
in interface StreamingManager
public CursorProvider manage(CursorProvider provider, CoreEvent creatorEvent)
provider
and returns a replacement provider
which is managed by the runtime, allowing for automatic resource handlingmanage
in interface StreamingManager
provider
- the provider to be trackedcreatorEvent
- the event that created the providerCursorContext
public void manage(InputStream stream, CoreEvent creatorEvent)
inputStream
and makes sure it is closed
by the time the given creatorEvent
(and all its parent events) are completed.
If inputStream
is a Cursor
then nothing happens. Use
StreamingManager.manage(CursorProvider, CoreEvent)
for those cases.
manage
in interface StreamingManager
stream
- the stream to trackcreatorEvent
- the event on which the stream was createdpublic StreamingStatistics getStreamingStatistics()
getStreamingStatistics
in interface StreamingManager
protected ByteBufferManager getBufferManager()
Copyright © 2018. All rights reserved.