public abstract class AbstractTransformPolicy extends Object implements TransformPolicy
TransformPolicy
.
Subclasses must define the behavior of the copying Thread
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractTransformPolicy.TransformerWork |
Modifier and Type | Field and Description |
---|---|
protected boolean |
isClosed |
protected static Log |
logger |
Constructor and Description |
---|
AbstractTransformPolicy() |
Modifier and Type | Method and Description |
---|---|
protected AtomicLong |
getBytesRequested() |
protected abstract Thread |
getCopyingThread() |
protected LazyTransformedInputStream |
getInputStream() |
protected StreamTransformer |
getTransformer() |
void |
initialize(LazyTransformedInputStream lazyTransformedInputStream)
Initialize this policy with the corresponding lazyTransformedInputStream
|
void |
readRequest(long length)
Notifies this policy that the object has requested nroOfBytes
|
void |
release()
Releases all the resources of this policy
|
protected void |
startCopyingThread() |
protected static final Log logger
protected volatile boolean isClosed
public void initialize(LazyTransformedInputStream lazyTransformedInputStream)
initialize
in interface TransformPolicy
public void readRequest(long length)
readRequest
in interface TransformPolicy
length
- the nro of bytes requested by the objectprotected void startCopyingThread()
public void release()
release
in interface TransformPolicy
protected abstract Thread getCopyingThread()
Thread
protected StreamTransformer getTransformer()
protected LazyTransformedInputStream getInputStream()
protected AtomicLong getBytesRequested()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.