APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.net.http

pack-priv Class Http1Request

extends Object
Class Inheritance
Imports
java.io.IOException, java.net.URI, .InetSocketAddress, java.net.http.HttpClient, .HttpHeaders, .HttpRequest, java.nio.ByteBuffer, java.util.ArrayList, .List, .Map, .Objects, java.util.concurrent.Flow, java.util.function.BiPredicate, jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber, jdk.internal.net.http.common.HttpHeadersBuilder, .Log, .Logger, .Utils

An HTTP/1.1 request.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private final HttpConnection
private volatile long
private static final byte[]
pack-priv final Logger
private static final byte[]
private boolean
private final Http1Exchange<?>
private static final BiPredicate<String, String>
private final HttpRequestImpl
private final HttpRequest.BodyPublisher
private volatile boolean
private final HttpHeadersBuilder
private volatile HttpHeaders

Constructor Summary

AccessConstructor and Description
pack-priv
Http1Request(HttpRequestImpl request, Http1Exchange<?> http1Exchange)

Method Summary

Modifier and TypeMethod and Description
private String
private void
public void
private void
pack-priv Http1Exchange.Http1RequestBodySubscriber
pack-priv synchronized boolean
private static ByteBuffer
getHeader(int size)

Returns a header for a particular chunk size

private String
pack-priv List<ByteBuffer>
private String
private void
logHeaders(String completeHeaders)

private String
pack-priv synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionback to summary
private final HttpConnection connection
contentLengthback to summary
private volatile long contentLength
CRLFback to summary
private static final byte[] CRLF
debugback to summary
pack-priv final Logger debug
EMPTY_CHUNK_BYTESback to summary
private static final byte[] EMPTY_CHUNK_BYTES
finishedback to summary
private boolean finished
http1Exchangeback to summary
private final Http1Exchange<?> http1Exchange
NOCOOKIESback to summary
private static final BiPredicate<String, String> NOCOOKIES
requestback to summary
private final HttpRequestImpl request
requestPublisherback to summary
private final HttpRequest.BodyPublisher requestPublisher
streamingback to summary
private volatile boolean streaming
systemHeadersBuilderback to summary
private final HttpHeadersBuilder systemHeadersBuilder
userHeadersback to summary
private volatile HttpHeaders userHeaders

Constructor Detail

Http1Requestback to summary
pack-priv Http1Request(HttpRequestImpl request, Http1Exchange<?> http1Exchange) throws IOException

Method Detail

authorityStringback to summary
private String authorityString(InetSocketAddress addr)
collectCookiesback to summary
private void collectCookies(StringBuilder sb, HttpHeaders system, HttpHeaders user)
collectHeaders0back to summary
public void collectHeaders0(StringBuilder sb)
collectHeaders1back to summary
private void collectHeaders1(StringBuilder sb, HttpHeaders headers, BiPredicate<String, String> filter)
continueRequestback to summary
pack-priv Http1Exchange.Http1RequestBodySubscriber continueRequest()
finishedback to summary
pack-priv synchronized boolean finished()
getHeaderback to summary
private static ByteBuffer getHeader(int size)

Returns a header for a particular chunk size

getPathAndQueryback to summary
private String getPathAndQuery(URI uri)
headersback to summary
pack-priv List<ByteBuffer> headers()
hostStringback to summary
private String hostString()
logHeadersback to summary
private void logHeaders(String completeHeaders)
requestURIback to summary
private String requestURI()
setFinishedback to summary
pack-priv synchronized void setFinished()
jdk.internal.net.http back to summary

pack-priv final Class Http1Request.FixedContentSubscriber

extends Http1RequestBodySubscriber
Class Inheritance

Field Summary

Modifier and TypeField and Description
private volatile long
Inherited from jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber:
completeCOMPLETEDwhenSubscribed

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
currentStateMessage()

Implements abstract jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber.currentStateMessage.

A current-state message suitable for inclusion in an exception detail message.

public void
onComplete()

Implements java.util.concurrent.Flow.Subscriber.onComplete.

Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription.

public void
onError(Throwable throwable)

Implements java.util.concurrent.Flow.Subscriber.onError.

Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription.

public void
onNext(ByteBuffer item)

Implements java.util.concurrent.Flow.Subscriber.onNext.

Method invoked with a Subscription's next item.

public void
onSubscribe(Flow.Subscription subscription)

Implements java.util.concurrent.Flow.Subscriber.onSubscribe.

Method invoked prior to invoking any other Subscriber methods for the given Subscription.

Inherited from jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber:
cancelSubscriptioncompleteSubscriberisSubscribedrequestsetSubscription

Field Detail

contentWrittenback to summary
private volatile long contentWritten

Constructor Detail

FixedContentSubscriberback to summary
pack-priv FixedContentSubscriber()

Method Detail

currentStateMessageback to summary
public String currentStateMessage()

Implements abstract jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber.currentStateMessage.

Doc from jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber.currentStateMessage.

A current-state message suitable for inclusion in an exception detail message.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements java.util.concurrent.Flow.Subscriber.onComplete.

Doc from java.util.concurrent.Flow.Subscriber.onComplete.

Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. If this method throws an exception, resulting behavior is undefined.

Annotations
@Override
onErrorback to summary
public void onError(Throwable throwable)

Implements java.util.concurrent.Flow.Subscriber.onError.

Doc from java.util.concurrent.Flow.Subscriber.onError.

Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. If this method itself throws an exception, resulting behavior is undefined.

Annotations
@Override
onNextback to summary
public void onNext(ByteBuffer item)

Implements java.util.concurrent.Flow.Subscriber.onNext.

Doc from java.util.concurrent.Flow.Subscriber.onNext.

Method invoked with a Subscription's next item. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription to be cancelled.

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Flow.Subscription subscription)

Implements java.util.concurrent.Flow.Subscriber.onSubscribe.

Doc from java.util.concurrent.Flow.Subscriber.onSubscribe.

Method invoked prior to invoking any other Subscriber methods for the given Subscription. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription not to be established or to be cancelled.

Typically, implementations of this method invoke subscription.request to enable receiving items.

Annotations
@Override
jdk.internal.net.http back to summary

pack-priv final Class Http1Request.StreamSubscriber

extends Http1RequestBodySubscriber
Class Inheritance

Field Summary

Inherited from jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber:
completeCOMPLETEDwhenSubscribed

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
currentStateMessage()

Implements abstract jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber.currentStateMessage.

A current-state message suitable for inclusion in an exception detail message.

public void
onComplete()

Implements java.util.concurrent.Flow.Subscriber.onComplete.

Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription.

public void
onError(Throwable throwable)

Implements java.util.concurrent.Flow.Subscriber.onError.

Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription.

public void
onNext(ByteBuffer item)

Implements java.util.concurrent.Flow.Subscriber.onNext.

Method invoked with a Subscription's next item.

public void
onSubscribe(Flow.Subscription subscription)

Implements java.util.concurrent.Flow.Subscriber.onSubscribe.

Method invoked prior to invoking any other Subscriber methods for the given Subscription.

Inherited from jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber:
cancelSubscriptioncompleteSubscriberisSubscribedrequestsetSubscription

Constructor Detail

StreamSubscriberback to summary
pack-priv StreamSubscriber()

Method Detail

currentStateMessageback to summary
public String currentStateMessage()

Implements abstract jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber.currentStateMessage.

Doc from jdk.internal.net.http.Http1Exchange.Http1RequestBodySubscriber.currentStateMessage.

A current-state message suitable for inclusion in an exception detail message.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements java.util.concurrent.Flow.Subscriber.onComplete.

Doc from java.util.concurrent.Flow.Subscriber.onComplete.

Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. If this method throws an exception, resulting behavior is undefined.

Annotations
@Override
onErrorback to summary
public void onError(Throwable throwable)

Implements java.util.concurrent.Flow.Subscriber.onError.

Doc from java.util.concurrent.Flow.Subscriber.onError.

Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. If this method itself throws an exception, resulting behavior is undefined.

Annotations
@Override
onNextback to summary
public void onNext(ByteBuffer item)

Implements java.util.concurrent.Flow.Subscriber.onNext.

Doc from java.util.concurrent.Flow.Subscriber.onNext.

Method invoked with a Subscription's next item. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription to be cancelled.

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Flow.Subscription subscription)

Implements java.util.concurrent.Flow.Subscriber.onSubscribe.

Doc from java.util.concurrent.Flow.Subscriber.onSubscribe.

Method invoked prior to invoking any other Subscriber methods for the given Subscription. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription not to be established or to be cancelled.

Typically, implementations of this method invoke subscription.request to enable receiving items.

Annotations
@Override