@Override public MultiMap headers() { synchronized (conn) { if (headersMap == null) { headersMap = new Http2HeadersAdaptor(headers); } return headersMap; } }
@Override public MultiMap headers() { synchronized (conn) { if (headersMap == null) { headersMap = new Http2HeadersAdaptor(headers); } return headersMap; } }
@Override public MultiMap trailers() { synchronized (conn) { if (trailedMap == null) { trailedMap = new Http2HeadersAdaptor(trailers = new DefaultHttp2Headers()); } return trailedMap; } }
@Before public void setUp() { headers = new DefaultHttp2Headers(); map = new Http2HeadersAdaptor(headers); }
status, statusMessage, new Http2HeadersAdaptor(headers) ); if (conn.metrics != null) { onEnd(new Http2HeadersAdaptor(headers));
@Override public synchronized void onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) throws Http2Exception { Http2ClientStream stream = (Http2ClientStream) streams.get(streamId); if (stream != null) { Handler<HttpClientRequest> pushHandler = stream.pushHandler(); if (pushHandler != null) { context.executeFromIO(v -> { String rawMethod = headers.method().toString(); HttpMethod method = HttpUtils.toVertxMethod(rawMethod); String uri = headers.path().toString(); String host = headers.authority() != null ? headers.authority().toString() : null; MultiMap headersMap = new Http2HeadersAdaptor(headers); Http2Stream promisedStream = handler.connection().stream(promisedStreamId); int port = remoteAddress().port(); HttpClientRequestPushPromise pushReq = new HttpClientRequestPushPromise(this, promisedStream, client, isSsl(), method, rawMethod, uri, host, port, headersMap); if (metrics != null) { pushReq.metric(metrics.responsePushed(queueMetric, metric(), localAddress(), remoteAddress(), pushReq)); } streams.put(promisedStreamId, pushReq.getStream()); pushHandler.handle(pushReq); }); return; } } handler.writeReset(promisedStreamId, Http2Error.CANCEL.code()); }
@Override public MultiMap headers() { synchronized (conn) { if (headersMap == null) { headersMap = new Http2HeadersAdaptor(headers); } return headersMap; } }
@Override public MultiMap headers() { synchronized (conn) { if (headersMap == null) { headersMap = new Http2HeadersAdaptor(headers); } return headersMap; } }
@Override public MultiMap trailers() { synchronized (conn) { if (trailedMap == null) { trailedMap = new Http2HeadersAdaptor(trailers = new DefaultHttp2Headers()); } return trailedMap; } }
@Before public void setUp() { headers = new DefaultHttp2Headers(); map = new Http2HeadersAdaptor(headers); }
status, statusMessage, new Http2HeadersAdaptor(headers) ); if (conn.metrics != null) { onEnd(new Http2HeadersAdaptor(headers));
@Override public synchronized void onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) throws Http2Exception { Http2ClientStream stream = (Http2ClientStream) streams.get(streamId); if (stream != null) { Handler<HttpClientRequest> pushHandler = stream.pushHandler(); if (pushHandler != null) { context.executeFromIO(v -> { String rawMethod = headers.method().toString(); HttpMethod method = HttpUtils.toVertxMethod(rawMethod); String uri = headers.path().toString(); String host = headers.authority() != null ? headers.authority().toString() : null; MultiMap headersMap = new Http2HeadersAdaptor(headers); Http2Stream promisedStream = handler.connection().stream(promisedStreamId); int port = remoteAddress().port(); HttpClientRequestPushPromise pushReq = new HttpClientRequestPushPromise(this, promisedStream, client, isSsl(), method, rawMethod, uri, host, port, headersMap); if (metrics != null) { pushReq.metric(metrics.responsePushed(queueMetric, metric(), localAddress(), remoteAddress(), pushReq)); } streams.put(promisedStreamId, pushReq.getStream()); pushHandler.handle(pushReq); }); return; } } handler.writeReset(promisedStreamId, Http2Error.CANCEL.code()); }