Package com.predic8.membrane.core.http
Class Request
java.lang.Object
com.predic8.membrane.core.http.Message
com.predic8.membrane.core.http.Request
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T extends Message>
TcreateSnapshot(Runnable bodyUpdatedCallback, BodyCollectingMessageObserver.Strategy strategy, long limit) static Request.Builderintstatic Request.BuildergetName()getUri()booleanNTLM and SPNEGO authentication schemes authorize HTTP connections, not single requests.booleanbooleanbooleanbooleanbooleanbooleanvoidstatic Request.Builderstatic Request.Buildervoidvoidbooleanfinal voidwriteSTOMP(OutputStream out, boolean retainBody) Methods inherited from class com.predic8.membrane.core.http.Message
addObserver, containsObserver, createBody, createMessageSnapshot, discardBody, getBody, getBodyAsStream, getBodyAsStreamDecoded, getBodyAsStringDecoded, getCharset, getErrorMessage, getHeader, getVersion, hasMsgReleased, isBodyEmpty, isCSS, isDeflate, isGzip, isHTML, isHTTP10, isHTTP11, isImage, isJavaScript, isJSON, isKeepAlive, isReleased, isXML, read, readBody, release, setBody, setBodyContent, setErrorMessage, setHeader, setReleased, setVersion, toString, write, writeStartLine
-
Field Details
-
METHOD_GET
- See Also:
-
METHOD_POST
- See Also:
-
METHOD_HEAD
- See Also:
-
METHOD_DELETE
- See Also:
-
METHOD_PUT
- See Also:
-
METHOD_TRACE
- See Also:
-
METHOD_CONNECT
- See Also:
-
METHOD_OPTIONS
- See Also:
-
-
Constructor Details
-
Request
public Request()
-
-
Method Details
-
parseStartLine
- Specified by:
parseStartLinein classMessage- Throws:
IOExceptionEndOfStreamException
-
getMethod
-
setMethod
-
getUri
- Returns:
- the "Request-URI" as sent by the client in the first line of the HTTP request (quoting from RFC 2616: Request-URI = "*" | absoluteURI | abs_path | authority )
-
setUri
-
create
public void create(String method, String uri, String protocol, Header header, InputStream in) throws IOException - Throws:
IOException
-
getStartLine
- Specified by:
getStartLinein classMessage
-
isHEADRequest
public boolean isHEADRequest() -
isGETRequest
public boolean isGETRequest() -
isPOSTRequest
public boolean isPOSTRequest() -
isDELETERequest
public boolean isDELETERequest() -
isCONNECTRequest
public boolean isCONNECTRequest() -
isOPTIONSRequest
public boolean isOPTIONSRequest() -
getName
-
shouldNotContainBody
public boolean shouldNotContainBody()- Specified by:
shouldNotContainBodyin classMessage
-
isBindTargetConnectionToIncoming
public boolean isBindTargetConnectionToIncoming()NTLM and SPNEGO authentication schemes authorize HTTP connections, not single requests. We therefore have to "bind" the targetConnection to the incoming connection to ensure the same targetConnection is used again for further requests. -
estimateHeapSize
public int estimateHeapSize()- Overrides:
estimateHeapSizein classMessage
-
createSnapshot
public <T extends Message> T createSnapshot(Runnable bodyUpdatedCallback, BodyCollectingMessageObserver.Strategy strategy, long limit) - Specified by:
createSnapshotin classMessage
-
writeSTOMP
- Throws:
IOException
-
get
- Throws:
URISyntaxException
-
put
- Throws:
URISyntaxException
-
post
- Throws:
URISyntaxException
-
delete
- Throws:
URISyntaxException
-