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 clienthttprequests 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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -