- java.lang.Object
-
- swim.http.HttpPayload<T>
-
- swim.http.HttpChunked<T>
-
- All Implemented Interfaces:
Debug
public final class HttpChunked<T> extends HttpPayload<T> implements Debug
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> HttpChunked<T>
create(Encoder<?,T> payloadEncoder)
static <T> HttpChunked<T>
create(Encoder<?,T> payloadEncoder, MediaType mediaType)
static <T> HttpChunked<T>
create(T payloadValue, Encoder<?,T> payloadEncoder)
static <T> HttpChunked<T>
create(T payloadValue, Encoder<?,T> payloadEncoder, MediaType mediaType)
<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.static <T> Decoder<HttpMessage<T>>
decodeHttp(InputBuffer input, HttpMessage<?> message, Decoder<T> payloadDecoder)
<T2> Encoder<?,HttpMessage<T2>>
encodeHttp(OutputBuffer<?> output, HttpMessage<T2> message, HttpWriter http)
boolean
equals(Object other)
static <T> HttpChunked<T>
fromFile(String path)
static <T> HttpChunked<T>
fromFile(String path, MediaType mediaType)
T
get()
int
hashCode()
FingerTrieSeq<HttpHeader>
headers()
static <T> Decoder<HttpMessage<T>>
httpDecoder(HttpMessage<?> message, Decoder<T> payloadDecoder)
<T2> Encoder<?,HttpMessage<T2>>
httpEncoder(HttpMessage<T2> message, HttpWriter http)
boolean
isDefined()
MediaType
mediaType()
Encoder<?,?>
payloadEncoder()
String
toString()
FingerTrieSeq<TransferCoding>
transferCodings()
-
Methods inherited from class swim.http.HttpPayload
empty, encodeHttp, httpEncoder
-
-
-
-
Method Detail
-
isDefined
public boolean isDefined()
- Specified by:
isDefined
in classHttpPayload<T>
-
get
public T get()
- Specified by:
get
in classHttpPayload<T>
-
payloadEncoder
public Encoder<?,?> payloadEncoder()
-
mediaType
public MediaType mediaType()
- Specified by:
mediaType
in classHttpPayload<T>
-
transferCodings
public FingerTrieSeq<TransferCoding> transferCodings()
- Specified by:
transferCodings
in classHttpPayload<T>
-
headers
public FingerTrieSeq<HttpHeader> headers()
- Specified by:
headers
in classHttpPayload<T>
-
httpEncoder
public <T2> Encoder<?,HttpMessage<T2>> httpEncoder(HttpMessage<T2> message, HttpWriter http)
- Specified by:
httpEncoder
in classHttpPayload<T>
-
encodeHttp
public <T2> Encoder<?,HttpMessage<T2>> encodeHttp(OutputBuffer<?> output, HttpMessage<T2> message, HttpWriter http)
- Specified by:
encodeHttp
in classHttpPayload<T>
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
create
public static <T> HttpChunked<T> create(T payloadValue, Encoder<?,T> payloadEncoder, MediaType mediaType)
-
create
public static <T> HttpChunked<T> create(T payloadValue, Encoder<?,T> payloadEncoder)
-
create
public static <T> HttpChunked<T> create(Encoder<?,T> payloadEncoder, MediaType mediaType)
-
create
public static <T> HttpChunked<T> create(Encoder<?,T> payloadEncoder)
-
fromFile
public static <T> HttpChunked<T> fromFile(String path, MediaType mediaType) throws IOException
- Throws:
IOException
-
fromFile
public static <T> HttpChunked<T> fromFile(String path) throws IOException
- Throws:
IOException
-
httpDecoder
public static <T> Decoder<HttpMessage<T>> httpDecoder(HttpMessage<?> message, Decoder<T> payloadDecoder)
-
decodeHttp
public static <T> Decoder<HttpMessage<T>> decodeHttp(InputBuffer input, HttpMessage<?> message, Decoder<T> payloadDecoder)
-
-