Class ProvidenceHttpBufferedContent

  • All Implemented Interfaces:
    com.google.api.client.http.HttpContent, com.google.api.client.util.StreamingContent

    public class ProvidenceHttpBufferedContent
    extends java.lang.Object
    implements com.google.api.client.http.HttpContent
    HTTP content wrapper for providence messages. Use this is the receiving end requires the content to have a known size before it being sent. Otherwise use ProvidenceHttpContent.
    Since:
    1.8.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ProvidenceHttpBufferedContent​(net.morimekta.providence.PMessageOrBuilder message, net.morimekta.providence.serializer.Serializer serializer)  
      ProvidenceHttpBufferedContent​(net.morimekta.providence.PServiceCall serviceCall, net.morimekta.providence.serializer.Serializer serializer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getLength()  
      java.lang.String getType()  
      boolean retrySupported()  
      void writeTo​(java.io.OutputStream out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProvidenceHttpBufferedContent

        public ProvidenceHttpBufferedContent​(@Nonnull
                                             net.morimekta.providence.PMessageOrBuilder message,
                                             @Nonnull
                                             net.morimekta.providence.serializer.Serializer serializer)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • ProvidenceHttpBufferedContent

        public ProvidenceHttpBufferedContent​(@Nonnull
                                             net.morimekta.providence.PServiceCall serviceCall,
                                             @Nonnull
                                             net.morimekta.providence.serializer.Serializer serializer)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getLength

        public long getLength()
        Specified by:
        getLength in interface com.google.api.client.http.HttpContent
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface com.google.api.client.http.HttpContent
      • retrySupported

        public boolean retrySupported()
        Specified by:
        retrySupported in interface com.google.api.client.http.HttpContent
      • writeTo

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.api.client.http.HttpContent
        Specified by:
        writeTo in interface com.google.api.client.util.StreamingContent
        Throws:
        java.io.IOException