public class HttpTransport
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.channel.Channel |
channel |
protected Client |
client |
protected HttpAddress |
httpAddress |
protected java.util.SortedMap<java.lang.Integer,Request> |
requests |
protected java.lang.Throwable |
throwable |
TRANSPORT_ATTRIBUTE_KEY| Constructor and Description |
|---|
HttpTransport(Client client,
HttpAddress httpAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitResponse(java.lang.Integer streamId) |
void |
awaitSettings() |
void |
close() |
protected Request |
continuation(Request request,
io.netty.handler.codec.http.FullHttpResponse httpResponse) |
Transport |
execute(Request request) |
<T> java.util.concurrent.CompletableFuture<T> |
execute(Request request,
java.util.function.Function<io.netty.handler.codec.http.FullHttpResponse,T> supplier)
Experimental method for executing in a wrapping completable future.
|
void |
fail(java.lang.Throwable throwable) |
protected Request |
fromStreamId(java.lang.Integer streamId) |
Transport |
get() |
java.util.Map<io.netty.handler.codec.http.cookie.Cookie,java.lang.Boolean> |
getCookieBox() |
java.lang.Throwable |
getFailure() |
void |
headersReceived(java.lang.Integer streamId,
io.netty.handler.codec.http.HttpHeaders httpHeaders) |
boolean |
isFailed() |
java.lang.Integer |
nextStream() |
void |
pushPromiseReceived(java.lang.Integer streamId,
java.lang.Integer promisedStreamId,
io.netty.handler.codec.http2.Http2Headers headers) |
void |
responseReceived(java.lang.Integer streamId,
io.netty.handler.codec.http.FullHttpResponse fullHttpResponse) |
protected Request |
retry(Request request,
io.netty.handler.codec.http.FullHttpResponse httpResponse) |
void |
setCookieBox(java.util.Map<io.netty.handler.codec.http.cookie.Cookie,java.lang.Boolean> cookieBox) |
void |
settingsReceived(io.netty.channel.Channel channel,
io.netty.handler.codec.http2.Http2Settings http2Settings) |
void |
success() |
protected final Client client
protected final HttpAddress httpAddress
protected io.netty.channel.Channel channel
protected java.util.SortedMap<java.lang.Integer,Request> requests
protected java.lang.Throwable throwable
public HttpTransport(Client client, HttpAddress httpAddress)
public java.lang.Integer nextStream()
public void settingsReceived(io.netty.channel.Channel channel,
io.netty.handler.codec.http2.Http2Settings http2Settings)
public void awaitSettings()
public void responseReceived(java.lang.Integer streamId,
io.netty.handler.codec.http.FullHttpResponse fullHttpResponse)
public void pushPromiseReceived(java.lang.Integer streamId,
java.lang.Integer promisedStreamId,
io.netty.handler.codec.http2.Http2Headers headers)
public void awaitResponse(java.lang.Integer streamId)
throws java.io.IOException,
java.util.concurrent.TimeoutException
java.io.IOExceptionjava.util.concurrent.TimeoutExceptionpublic Transport get()
public void success()
public void fail(java.lang.Throwable throwable)
public <T> java.util.concurrent.CompletableFuture<T> execute(Request request, java.util.function.Function<io.netty.handler.codec.http.FullHttpResponse,T> supplier) throws java.io.IOException
public void close()
throws java.io.IOException
public java.lang.Throwable getFailure()
getFailure in interface Transportpublic void headersReceived(java.lang.Integer streamId,
io.netty.handler.codec.http.HttpHeaders httpHeaders)
headersReceived in interface Transportprotected Request fromStreamId(java.lang.Integer streamId)
protected Request continuation(Request request, io.netty.handler.codec.http.FullHttpResponse httpResponse) throws org.xbib.net.URLSyntaxException
org.xbib.net.URLSyntaxExceptionprotected Request retry(Request request, io.netty.handler.codec.http.FullHttpResponse httpResponse)
public void setCookieBox(java.util.Map<io.netty.handler.codec.http.cookie.Cookie,java.lang.Boolean> cookieBox)
setCookieBox in interface Transportpublic java.util.Map<io.netty.handler.codec.http.cookie.Cookie,java.lang.Boolean> getCookieBox()
getCookieBox in interface Transport