Interface BodyGenerator
-
- All Known Subinterfaces:
FeedableBodyGenerator
- All Known Implementing Classes:
BoundedQueueFeedableBodyGenerator
,ByteArrayBodyGenerator
,FileBodyGenerator
,InputStreamBodyGenerator
,QueueBasedFeedableBodyGenerator
,UnboundedQueueFeedableBodyGenerator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface BodyGenerator
Creates a request body.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Body
createBody()
Creates a new instance of the request body to be read.
-
-
-
Method Detail
-
createBody
Body createBody()
Creates a new instance of the request body to be read. While each invocation of this method is supposed to create a fresh instance of the body, the actual contents of all these body instances is the same. For example, the body needs to be resend after an authentication challenge of a redirect.- Returns:
- The request body, never
null
.
-
-