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

public abstract class BasePayload<V> extends Object implements Payload
  • Field Details

    • content

      protected final V content
    • written

      protected transient volatile boolean written
    • contentMetadata

      protected MutableContentMetadata contentMetadata
  • Constructor Details

    • BasePayload

      protected BasePayload(V content)
    • BasePayload

      protected BasePayload(V content, MutableContentMetadata contentMetadata)
  • Method Details

    • getInput

      public InputStream getInput()
      Description copied from interface: Payload
      Creates a new InputStream object of the payload.
      Specified by:
      getInput in interface Payload
    • getRawContent

      public V getRawContent()
      Payload in its original form.
      Specified by:
      getRawContent in interface Payload
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isRepeatable

      public boolean isRepeatable()
      By default we are repeatable.
      Specified by:
      isRepeatable in interface Payload
    • release

      public void release()
      By default there are no resources to release.
      Specified by:
      release in interface Payload
    • close

      public void close()
      Delegates to release()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getContentMetadata

      public MutableContentMetadata getContentMetadata()
      Specified by:
      getContentMetadata in interface Payload
    • setContentMetadata

      public void setContentMetadata(MutableContentMetadata in)
      Specified by:
      setContentMetadata in interface Payload
    • 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 interface Payload
    • 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 interface Payload