Package org.webpieces.httpclient11.api
Interface HttpSocket
-
- All Known Implementing Classes:
HttpSocketImpl
public interface HttpSocket
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>close()java.util.concurrent.CompletableFuture<java.lang.Void>connect(java.net.InetSocketAddress addr)booleanisClosed()java.util.concurrent.CompletableFuture<HttpFullResponse>send(HttpFullRequest request)This can be used ONLY if 'you' know that the far end does NOT sended a chunked download.HttpStreamRefsend(org.webpieces.httpparser.api.dto.HttpRequest request, HttpResponseListener l)
-
-
-
Method Detail
-
connect
java.util.concurrent.CompletableFuture<java.lang.Void> connect(java.net.InetSocketAddress addr)
-
send
java.util.concurrent.CompletableFuture<HttpFullResponse> send(HttpFullRequest request)
This can be used ONLY if 'you' know that the far end does NOT sended a chunked download. The reason is in a chunked download, we don't want to blow up your RAM. Some apis like twitters streaming api and we would never ever be done and have a full response. Others are just a very very large download you don't want existing in RAM anyways.- Parameters:
request-
-
send
HttpStreamRef send(org.webpieces.httpparser.api.dto.HttpRequest request, HttpResponseListener l)
-
close
java.util.concurrent.CompletableFuture<java.lang.Void> close()
-
isClosed
boolean isClosed()
-
-