Package org.webpieces.httpclient11.impl
Class HttpSocketImpl
- java.lang.Object
-
- org.webpieces.httpclient11.impl.HttpSocketImpl
-
- All Implemented Interfaces:
HttpSocket
public class HttpSocketImpl extends java.lang.Object implements HttpSocket
-
-
Constructor Summary
Constructors Constructor Description HttpSocketImpl(ChannelProxy channel, org.webpieces.httpparser.api.HttpParser parser, HttpSocketListener socketListener, boolean isHttps)
-
Method Summary
All Methods Instance Methods Concrete 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 listener)java.lang.StringtoString()
-
-
-
Constructor Detail
-
HttpSocketImpl
public HttpSocketImpl(ChannelProxy channel, org.webpieces.httpparser.api.HttpParser parser, HttpSocketListener socketListener, boolean isHttps)
-
-
Method Detail
-
connect
public java.util.concurrent.CompletableFuture<java.lang.Void> connect(java.net.InetSocketAddress addr)
- Specified by:
connectin interfaceHttpSocket
-
send
public java.util.concurrent.CompletableFuture<HttpFullResponse> send(HttpFullRequest request)
Description copied from interface:HttpSocketThis 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.- Specified by:
sendin interfaceHttpSocket
-
send
public HttpStreamRef send(org.webpieces.httpparser.api.dto.HttpRequest request, HttpResponseListener listener)
- Specified by:
sendin interfaceHttpSocket
-
close
public java.util.concurrent.CompletableFuture<java.lang.Void> close()
- Specified by:
closein interfaceHttpSocket
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceHttpSocket
-
-