Class SyncAsyncHttpClient

java.lang.Object
dev.vality.http.client.SyncAsyncHttpClient
All Implemented Interfaces:
HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>

public class SyncAsyncHttpClient
extends Object
implements HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
  • Constructor Summary

    Constructors
    Constructor Description
    SyncAsyncHttpClient()  
  • Method Summary

    Modifier and Type Method Description
    <T> Response<T> delete​(String methodName, org.apache.http.client.methods.HttpDelete httpDelete, Function<org.apache.http.HttpResponse,​T> handler)  
    <T> Response<T> delete​(String methodName, org.apache.http.client.methods.HttpDelete httpDelete, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)  
    <T> Response<T> get​(String methodName, org.apache.http.client.methods.HttpGet httpGet, Function<org.apache.http.HttpResponse,​T> handler)  
    <T> Response<T> get​(String methodName, org.apache.http.client.methods.HttpGet httpGet, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)  
    <T> Response<T> post​(String methodName, org.apache.http.client.methods.HttpPost httpPost, Function<org.apache.http.HttpResponse,​T> handler)  
    <T> Response<T> post​(String methodName, org.apache.http.client.methods.HttpPost httpPost, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)  
    <T> Response<T> put​(String methodName, org.apache.http.client.methods.HttpPut httpPut, Function<org.apache.http.HttpResponse,​T> handler)  
    <T> Response<T> put​(String methodName, org.apache.http.client.methods.HttpPut httpPut, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SyncAsyncHttpClient

      public SyncAsyncHttpClient()
  • Method Details

    • post

      public <T> Response<T> post​(String methodName, org.apache.http.client.methods.HttpPost httpPost, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)
      Specified by:
      post in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • post

      public <T> Response<T> post​(String methodName, org.apache.http.client.methods.HttpPost httpPost, Function<org.apache.http.HttpResponse,​T> handler)
      Specified by:
      post in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • get

      public <T> Response<T> get​(String methodName, org.apache.http.client.methods.HttpGet httpGet, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)
      Specified by:
      get in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • get

      public <T> Response<T> get​(String methodName, org.apache.http.client.methods.HttpGet httpGet, Function<org.apache.http.HttpResponse,​T> handler)
      Specified by:
      get in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • delete

      public <T> Response<T> delete​(String methodName, org.apache.http.client.methods.HttpDelete httpDelete, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)
      Specified by:
      delete in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • delete

      public <T> Response<T> delete​(String methodName, org.apache.http.client.methods.HttpDelete httpDelete, Function<org.apache.http.HttpResponse,​T> handler)
      Specified by:
      delete in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • put

      public <T> Response<T> put​(String methodName, org.apache.http.client.methods.HttpPut httpPut, Function<org.apache.http.HttpResponse,​T> handler, org.apache.http.impl.nio.client.CloseableHttpAsyncClient client)
      Specified by:
      put in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>
    • put

      public <T> Response<T> put​(String methodName, org.apache.http.client.methods.HttpPut httpPut, Function<org.apache.http.HttpResponse,​T> handler)
      Specified by:
      put in interface HttpClient<org.apache.http.impl.nio.client.CloseableHttpAsyncClient,​org.apache.http.HttpResponse>