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 Vprotected MutableContentMetadataprotected boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBasePayload(V content) protectedBasePayload(V content, MutableContentMetadata contentMetadata) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Delegates to release()booleangetInput()Creates a new InputStream object of the payload.Payload in its original form.inthashCode()booleanBy default we are repeatable.booleanReturns whether the payload contains sensitive information.voidrelease()By default there are no resources to release.voidvoidsetSensitive(boolean isSensitive) Sets whether the payload contains sensitive information.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:PayloadCreates a new InputStream object of the payload. -
getRawContent
Payload in its original form.- Specified by:
getRawContentin interfacePayload
-
hashCode
public int hashCode() -
equals
-
toString
-
isRepeatable
public boolean isRepeatable()By default we are repeatable.- Specified by:
isRepeatablein interfacePayload
-
release
public void release()By default there are no resources to release. -
close
public void close()Delegates to release()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getContentMetadata
- Specified by:
getContentMetadatain interfacePayload
-
setContentMetadata
- Specified by:
setContentMetadatain interfacePayload
-
setSensitive
public void setSensitive(boolean isSensitive) Description copied from interface:PayloadSets 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:
setSensitivein interfacePayload
-
isSensitive
public boolean isSensitive()Description copied from interface:PayloadReturns 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:
isSensitivein interfacePayload
-