本文整理汇总了Java中org.springframework.social.support.ClientHttpRequestFactorySelector.bufferRequests方法的典型用法代码示例。如果您正苦于以下问题:Java ClientHttpRequestFactorySelector.bufferRequests方法的具体用法?Java ClientHttpRequestFactorySelector.bufferRequests怎么用?Java ClientHttpRequestFactorySelector.bufferRequests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.social.support.ClientHttpRequestFactorySelector
的用法示例。
在下文中一共展示了ClientHttpRequestFactorySelector.bufferRequests方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setRequestFactory
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
@Override
public void setRequestFactory(ClientHttpRequestFactory requestFactory)
{
// Wrap the request factory with a BufferingClientHttpRequestFactory so
// that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(requestFactory));
}
示例2: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
private void initialize()
{
// Wrap the request factory with a BufferingClientHttpRequestFactory so
// that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis();
}
示例3: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
private void initialize(String clientId, String accessToken, String guid) {
// Wrap the request factory with a BufferingClientHttpRequestFactory so
// that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector
.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis(clientId, accessToken, guid);
}
示例4: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
private void initialize(String apiBaseUrl, String accessToken) {
// Wrap the request factory with a BufferingClientHttpRequestFactory so
// that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector
.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis(apiBaseUrl, accessToken);
}
示例5: NaverOAuth2ApiBinding
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
public NaverOAuth2ApiBinding(final String accessToken) {
super(accessToken);
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
// set interceptors
getRestTemplate().setInterceptors(Arrays.asList(new ClientHttpRequestInterceptor[]{new AdminKeyHeaderOAuth2RequestInterceptor(accessToken)}));
// set xml->class http message converters
getRestTemplate().setMessageConverters(Arrays.asList(new HttpMessageConverter<?>[]{new Jaxb2RootElementHttpMessageConverter()}));
// init api operations
userOperation = new UserOperationImpl(getRestTemplate(), isAuthorized());
}
示例6: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
private void initialize()
{
getRestTemplate().setErrorHandler(new FlickrErrorHandler());
// Wrap the request factory with a BufferingClientHttpRequestFactory so
// that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis();
}
示例7: createRestTemplateWithCulledMessageConverters
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
protected RestTemplate createRestTemplateWithCulledMessageConverters() {
// need to buffer the response in order to check the response was error or not.
// if slideshare returns error, http status is 200 and contents is error xml.
ClientHttpRequestFactory requestFactory = ClientHttpRequestFactorySelector.getRequestFactory();
ClientHttpRequestFactory bufferedRequestFactory = ClientHttpRequestFactorySelector.bufferRequests(requestFactory);
List<HttpMessageConverter<?>> messageConverters = getMessageConverters();
RestTemplate client = new RestTemplate(messageConverters);
client.setRequestFactory(bufferedRequestFactory);
return client;
}
示例8: PlusImpl
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
public PlusImpl(String accessToken, GooglePlusConfiguration config, OAuth2RefreshCallback refreshCallback) {
super(accessToken);
// (doing work in constructor because the superclass does it that forces us to do it)
configure(config);
// Wrap the request factory with a BufferingClientHttpRequestFactory so
// that the error handler can do repeat reads on the response.getBody()
ClientHttpRequestFactory requestFactory = ClientHttpRequestFactorySelector
.bufferRequests(getRestTemplate().getRequestFactory());
requestFactory = new TokenRefreshingClientHttpRequestFactory(requestFactory, refreshCallback, getRestTemplate().getInterceptors());
getRestTemplate().setRequestFactory(requestFactory);
}
示例9: DirectLineTemplate
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
public DirectLineTemplate(String accessToken) {
super(accessToken);
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
this.tokenOperations = new TokenTemplate(getRestTemplate());
this.conversationOperations = new ConversationTemplate(getRestTemplate());
}
示例10: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
private void initialize() {
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis();
}
示例11: setRequestFactory
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
@Override
public void setRequestFactory(final ClientHttpRequestFactory requestFactory) {
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(requestFactory));
}
示例12: setRequestFactory
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
@Override
public void setRequestFactory(ClientHttpRequestFactory requestFactory) {
// Wrap the request factory with a BufferingClientHttpRequestFactory so that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(requestFactory));
}
示例13: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
private void initialize() {
// Wrap the request factory with a BufferingClientHttpRequestFactory so that the error handler can do repeat reads on the response.getBody()
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis();
}
示例14: initialize
import org.springframework.social.support.ClientHttpRequestFactorySelector; //导入方法依赖的package包/类
/**
* private helpers.
*/
private void initialize() {
super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(getRestTemplate().getRequestFactory()));
initSubApis();
}