- java.lang.Object
-
- swim.http.HttpParser
-
public class HttpParser extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpParser()
-
Method Summary
-
-
-
Method Detail
-
request
public <T> HttpRequest<T> request(HttpMethod method, Uri uri, HttpVersion version, FingerTrieSeq<HttpHeader> headers)
-
response
public <T> HttpResponse<T> response(HttpVersion version, HttpStatus status, FingerTrieSeq<HttpHeader> headers)
-
method
public HttpMethod method(String name)
-
status
public HttpStatus status(int code, String phrase)
-
version
public HttpVersion version(int major, int minor)
-
chunkHeader
public HttpChunkHeader chunkHeader(long size, FingerTrieSeq<ChunkExtension> extensions)
-
chunkTrailer
public HttpChunkTrailer chunkTrailer(FingerTrieSeq<HttpHeader> headers)
-
chunkExtension
public ChunkExtension chunkExtension(String name, String value)
-
charset
public HttpCharset charset(String name, float weight)
-
languageRange
public LanguageRange languageRange(String tag, String subtag, float weight)
-
mediaRange
public MediaRange mediaRange(String type, String subtype, float weight, HashTrieMap<String,String> params)
-
mediaType
public MediaType mediaType(String type, String subtype, HashTrieMap<String,String> params)
-
product
public Product product(String name, String version, FingerTrieSeq<String> comments)
-
contentCoding
public ContentCoding contentCoding(String name, float weight)
-
transferCoding
public TransferCoding transferCoding(String name, HashTrieMap<String,String> params)
-
upgradeProtocol
public UpgradeProtocol upgradeProtocol(String name, String version)
-
webSocketParam
public WebSocketParam webSocketParam(String key, String value)
-
webSocketExtension
public WebSocketExtension webSocketExtension(String name, FingerTrieSeq<WebSocketParam> params)
-
requestParser
public <T> Parser<HttpRequest<T>> requestParser()
-
parseRequest
public <T> Parser<HttpRequest<T>> parseRequest(Input input)
-
parseRequestString
public <T> HttpRequest<T> parseRequestString(String string)
-
responseParser
public <T> Parser<HttpResponse<T>> responseParser()
-
parseResponse
public <T> Parser<HttpResponse<T>> parseResponse(Input input)
-
parseResponseString
public <T> HttpResponse<T> parseResponseString(String string)
-
methodParser
public Parser<HttpMethod> methodParser()
-
parseMethod
public Parser<HttpMethod> parseMethod(Input input)
-
parseMethodString
public HttpMethod parseMethodString(String string)
-
statusParser
public Parser<HttpStatus> statusParser()
-
parseStatus
public Parser<HttpStatus> parseStatus(Input input)
-
parseStatusString
public HttpStatus parseStatusString(String string)
-
versionParser
public Parser<HttpVersion> versionParser()
-
parseVersion
public Parser<HttpVersion> parseVersion(Input input)
-
parseVersionString
public HttpVersion parseVersionString(String string)
-
headerParser
public Parser<HttpHeader> headerParser()
-
parseHeader
public Parser<HttpHeader> parseHeader(Input input)
-
parseHeaderString
public HttpHeader parseHeaderString(String string)
-
parseHeaderValue
public Parser<? extends HttpHeader> parseHeaderValue(Input input, String name)
-
chunkHeaderParser
public Parser<HttpChunkHeader> chunkHeaderParser()
-
parseChunkHeader
public Parser<HttpChunkHeader> parseChunkHeader(Input input)
-
parseChunkHeaderString
public HttpChunkHeader parseChunkHeaderString(String string)
-
chunkTrailerParser
public Parser<HttpChunkTrailer> chunkTrailerParser()
-
parseChunkTrailer
public Parser<HttpChunkTrailer> parseChunkTrailer(Input input)
-
parseChunkTrailerString
public HttpChunkTrailer parseChunkTrailerString(String string)
-
chunkExtensionParser
public Parser<ChunkExtension> chunkExtensionParser()
-
parseChunkExtension
public Parser<ChunkExtension> parseChunkExtension(Input input)
-
parseChunkExtensionString
public ChunkExtension parseChunkExtensionString(String string)
-
charsetParser
public Parser<HttpCharset> charsetParser()
-
parseCharset
public Parser<HttpCharset> parseCharset(Input input)
-
parseCharsetString
public HttpCharset parseCharsetString(String string)
-
languageRangeParser
public Parser<LanguageRange> languageRangeParser()
-
parseLanguageRange
public Parser<LanguageRange> parseLanguageRange(Input input)
-
parseLanguageRangeString
public LanguageRange parseLanguageRangeString(String string)
-
mediaRangeParser
public Parser<MediaRange> mediaRangeParser()
-
parseMediaRange
public Parser<MediaRange> parseMediaRange(Input input)
-
parseMediaRangeString
public MediaRange parseMediaRangeString(String string)
-
contentCodingParser
public Parser<ContentCoding> contentCodingParser()
-
parseContentCoding
public Parser<ContentCoding> parseContentCoding(Input input)
-
parseContentCodingString
public ContentCoding parseContentCodingString(String string)
-
transferCodingParser
public Parser<TransferCoding> transferCodingParser()
-
parseTransferCoding
public Parser<TransferCoding> parseTransferCoding(Input input)
-
parseTransferCodingString
public TransferCoding parseTransferCodingString(String string)
-
upgradeProtocolParser
public Parser<UpgradeProtocol> upgradeProtocolParser()
-
parseUpgradeProtocol
public Parser<UpgradeProtocol> parseUpgradeProtocol(Input input)
-
parseUpgradeProtocolString
public UpgradeProtocol parseUpgradeProtocolString(String string)
-
webSocketParamParser
public Parser<WebSocketParam> webSocketParamParser()
-
parseWebSocketParam
public Parser<WebSocketParam> parseWebSocketParam(Input input)
-
parseWebSocketParamString
public WebSocketParam parseWebSocketParamString(String string)
-
webSocketExtensionParser
public Parser<WebSocketExtension> webSocketExtensionParser()
-
parseWebSocketExtension
public Parser<WebSocketExtension> parseWebSocketExtension(Input input)
-
parseWebSocketExtensionString
public WebSocketExtension parseWebSocketExtensionString(String string)
-
parseTokenList
public Parser<FingerTrieSeq<String>> parseTokenList(Input input)
-
parseParamMap
public Parser<HashTrieMap<String,String>> parseParamMap(Input input)
-
parseParamMapRest
public Parser<HashTrieMap<String,String>> parseParamMapRest(Input input)
-
parseParamMapRest
public Parser<HashTrieMap<String,String>> parseParamMapRest(Input input, StringBuilder key)
-
bodyDecoder
public <T> Decoder<HttpMessage<T>> bodyDecoder(HttpMessage<?> message, Decoder<T> payloadDecoder, long contentLength)
-
decodeBody
public <T> Decoder<HttpMessage<T>> decodeBody(InputBuffer input, HttpMessage<?> message, Decoder<T> payloadDecoder, long contentLength)
-
chunkedDecoder
public <T> Decoder<HttpMessage<T>> chunkedDecoder(HttpMessage<?> message, Decoder<T> payloadDecoder)
-
decodeChunked
public <T> Decoder<HttpMessage<T>> decodeChunked(InputBuffer input, HttpMessage<?> message, Decoder<T> payloadDecoder)
-
-