rest - Spring RestTemplate - BufferingClientHttpRequestFactory & SimpleClientHttpRequestFactory -
i saw below code in 1 of rest clients built using spring. rest client present within rest service , calling rest service. purpose of statement?
return new bufferingclienthttprequestfactory(new simpleclienthttprequestfactory())
bufferingclienthttprequestfactory
decorator around clienthttprequestfactory
, resttemplate uses create clienthttprequest
s faciliate http communication. decorator in particular provides buffering of outgoing/incoming streams.
simpleclienthttprequestfactory
implementation of clienthttprequestfactory
, uses jdk facilities (classes java.net
package) , therefore not depend on third party libraries, such apache httpcomponents http client, required implementation httpcomponentsclienthttprequestfactory
.
Comments
Post a Comment