Package net.morimekta.providence.client
Class ProvidenceHttpBufferedContent
- java.lang.Object
-
- net.morimekta.providence.client.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 useProvidenceHttpContent
.- Since:
- 1.8.0
-
-
Constructor Summary
Constructors Constructor Description ProvidenceHttpBufferedContent(PMessageOrBuilder message, Serializer serializer)
ProvidenceHttpBufferedContent(PServiceCall serviceCall, 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)
-
-
-
Constructor Detail
-
ProvidenceHttpBufferedContent
public ProvidenceHttpBufferedContent(@Nonnull PMessageOrBuilder message, @Nonnull Serializer serializer) throws java.io.IOException
- Throws:
java.io.IOException
-
ProvidenceHttpBufferedContent
public ProvidenceHttpBufferedContent(@Nonnull PServiceCall serviceCall, @Nonnull Serializer serializer) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getLength
public long getLength()
- Specified by:
getLength
in interfacecom.google.api.client.http.HttpContent
-
getType
public java.lang.String getType()
- Specified by:
getType
in interfacecom.google.api.client.http.HttpContent
-
retrySupported
public boolean retrySupported()
- Specified by:
retrySupported
in interfacecom.google.api.client.http.HttpContent
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.api.client.http.HttpContent
- Specified by:
writeTo
in interfacecom.google.api.client.util.StreamingContent
- Throws:
java.io.IOException
-
-