public abstract class BasePayload<V> extends Object implements Payload
| Modifier and Type | Field and Description |
|---|---|
protected V |
content |
protected MutableContentMetadata |
contentMetadata |
protected boolean |
written |
| Modifier | Constructor and Description |
|---|---|
protected |
BasePayload(V content) |
protected |
BasePayload(V content,
MutableContentMetadata contentMetadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Delegates to release()
|
boolean |
equals(Object obj) |
MutableContentMetadata |
getContentMetadata() |
InputStream |
getInput()
Creates a new InputStream object of the payload.
|
V |
getRawContent()
Payload in its original form.
|
int |
hashCode() |
boolean |
isRepeatable()
By default we are repeatable.
|
boolean |
isSensitive()
Returns whether the payload contains sensitive information.
|
void |
release()
By default there are no resources to release.
|
void |
setContentMetadata(MutableContentMetadata in) |
void |
setSensitive(boolean isSensitive)
Sets whether the payload contains sensitive information.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitopenStreamprotected final V content
protected transient volatile boolean written
protected MutableContentMetadata contentMetadata
protected BasePayload(V content)
protected BasePayload(V content, MutableContentMetadata contentMetadata)
public InputStream getInput()
Payloadpublic V getRawContent()
getRawContent in interface Payloadpublic boolean isRepeatable()
isRepeatable in interface Payloadpublic void release()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic MutableContentMetadata getContentMetadata()
getContentMetadata in interface Payloadpublic void setContentMetadata(MutableContentMetadata in)
setContentMetadata in interface Payloadpublic void setSensitive(boolean isSensitive)
PayloadsetSensitive in interface Payloadpublic boolean isSensitive()
PayloadisSensitive in interface PayloadCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.