Class ResponseSnapshot
java.lang.Object
com.predic8.membrane.core.exchange.snapshots.MessageSnapshot
com.predic8.membrane.core.exchange.snapshots.ResponseSnapshot
-
Constructor Summary
ConstructorsConstructorDescriptionResponseSnapshot(Response response, ExceptionThrowingConsumer<AbstractExchangeSnapshot> bodyCopiedCallback, AbstractExchangeSnapshot aes, BodyCollectingMessageObserver.Strategy strategy, long limit) -
Method Summary
Modifier and TypeMethodDescriptionintvoidsetStatusCode(int statusCode) voidsetStatusMessage(String statusMessage) Methods inherited from class com.predic8.membrane.core.exchange.snapshots.MessageSnapshot
convertBody, convertHeader, getBody, getHeader, setBody, setHeader
-
Constructor Details
-
ResponseSnapshot
public ResponseSnapshot(Response response, ExceptionThrowingConsumer<AbstractExchangeSnapshot> bodyCopiedCallback, AbstractExchangeSnapshot aes, BodyCollectingMessageObserver.Strategy strategy, long limit) throws IOException - Parameters:
response- the response to snapshotbodyCopiedCallback- will be called once the body has been filled. if null, the body stream will be read into memory immediately.aes- parameter for the callbackstrategy- how to handle body lengths exceeding thelimit.limit- maximum length of the body.- Throws:
IOException
-
ResponseSnapshot
public ResponseSnapshot()
-
-
Method Details
-
getStatusCode
public int getStatusCode() -
setStatusCode
public void setStatusCode(int statusCode) -
getStatusMessage
-
setStatusMessage
-
toResponse
-