Package org.jclouds.io.payloads
Class BasePayload<V>
java.lang.Object
org.jclouds.io.payloads.BasePayload<V>
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Payload
- Direct Known Subclasses:
ApacheHCUtils.HttpEntityPayload
,ByteArrayPayload
,ByteSourcePayload
,ChunkedUploadPayload
,FilePayload
,InputStreamPayload
,MultipartForm
,PhantomPayload
,StringPayload
,UrlEncodedFormPayload
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final V
protected MutableContentMetadata
protected boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BasePayload
(V content) protected
BasePayload
(V content, MutableContentMetadata contentMetadata) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Delegates to release()boolean
getInput()
Creates a new InputStream object of the payload.Payload in its original form.int
hashCode()
boolean
By default we are repeatable.boolean
Returns whether the payload contains sensitive information.void
release()
By default there are no resources to release.void
void
setSensitive
(boolean isSensitive) Sets whether the payload contains sensitive information.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jclouds.io.Payload
openStream
-
Field Details
-
-
written
protected transient volatile boolean written -
contentMetadata
-
-
Constructor Details
-
BasePayload
-
BasePayload
-
-
Method Details
-
getInput
Description copied from interface:Payload
Creates a new InputStream object of the payload. -
getRawContent
Payload in its original form.- Specified by:
getRawContent
in interfacePayload
-
hashCode
public int hashCode() -
equals
-
toString
-
isRepeatable
public boolean isRepeatable()By default we are repeatable.- Specified by:
isRepeatable
in interfacePayload
-
release
public void release()By default there are no resources to release. -
close
public void close()Delegates to release()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getContentMetadata
- Specified by:
getContentMetadata
in interfacePayload
-
setContentMetadata
- Specified by:
setContentMetadata
in interfacePayload
-
setSensitive
public void setSensitive(boolean isSensitive) Description copied from interface:Payload
Sets whether the payload contains sensitive information. This is used when trying to decide whether to print out the payload information or not in logs- Specified by:
setSensitive
in interfacePayload
-
isSensitive
public boolean isSensitive()Description copied from interface:Payload
Returns whether the payload contains sensitive information. This is used when trying to decide whether to print out the payload information or not in logs- Specified by:
isSensitive
in interfacePayload
-