APIdia Launch Partner
Top Fields Constructors Methods
com.sun.webkit.network

pack-priv final Class HTTP2Loader

extends URLLoaderBase
Class Inheritance
Imports
com.sun.javafx.logging.PlatformLogger.Level, .PlatformLogger, com.sun.javafx.tk.Toolkit, com.sun.webkit.Invoker, .LoadListenerClient, .WebPage, java.io.FileNotFoundException, .IOException, .InputStream, .SequenceInputStream, java.net.ConnectException, .CookieHandler, .MalformedURLException, .NoRouteToHostException, .SocketException, .SocketTimeoutException, .URI, .URISyntaxException, .UnknownHostException, java.net.http.HttpClient, .HttpRequest, .HttpResponse.BodyHandler, .HttpResponse.BodySubscriber, .HttpResponse, .HttpTimeoutException, java.nio.ByteBuffer, java.time.Duration, java.util.Arrays, .List, .Locale, .Vector, java.util.concurrent.CompletableFuture, .CompletionStage, .Flow, java.util.concurrent.atomic.AtomicBoolean, .AtomicLong, java.util.stream.Collectors, .Stream, java.util.zip.GZIPInputStream, .InflaterInputStream, javax.net.ssl.SSLHandshakeException

Field Summary

Modifier and TypeField and Description
private final boolean
private static final ByteBuffer
private volatile boolean
private final long
private static final int
private FormDataElement[]
private final String
private static final HttpClient
private static final PlatformLogger
private String
private final CompletableFuture<Void>
private String
private final WebPage
Inherited from com.sun.webkit.network.URLLoaderBase:
ALLOW_UNASSIGNED

Constructor Summary

AccessConstructor and Description
private
HTTP2Loader(WebPage webPage, ByteBufferPool byteBufferPool, boolean asynchronous, String url, String method, String headers, FormDataElement[] formDataElements, long data)

Method Summary

Modifier and TypeMethod and Description
private void
private ByteBuffer
pack-priv static HTTP2Loader
create(WebPage webPage, ByteBufferPool byteBufferPool, boolean asynchronous, String url, String method, String headers, FormDataElement[] formDataElements, long data)

Creates a new HTTP2Loader.

private HttpResponse.BodySubscriber<Void>
private HttpResponse.BodySubscriber<Void>
createZIPEncodedBodySubscriber(final String contentEncoding)

private InputStream
private Void
didFail(final Throwable th)

private void
private void
didReceiveData(final byte[] bytes, int size)

private void
private void
private void
didSendData(final long totalBytesSent, final long totalBytesToBeSent)

public void
fwkCancel()

Implements abstract com.sun.webkit.network.URLLoaderBase.fwkCancel.

Cancels this loader.

private HttpResponse.BodySubscriber<Void>
getBodySubscriber(final String contentEncoding)

private static String
private static long
private static String
private String[]
private ByteBuffer
getDirectBuffer(int size)

private HttpRequest.BodyPublisher
private static String
private String[]
private boolean
private void
notifyDidFail(int errorCode, String url, String message)

private void
private void
private void
notifyDidSendData(long totalBytesSent, long totalBytesToBeSent)

private URI
private void
private void
Inherited from com.sun.webkit.network.URLLoaderBase:
twkDidFailtwkDidFinishLoadingtwkDidReceiveDatatwkDidReceiveResponsetwkDidSendDatatwkWillSendRequest

Field Detail

asynchronousback to summary
private final boolean asynchronous
BUFFERback to summary
private static final ByteBuffer BUFFER
canceledback to summary
private volatile boolean canceled
databack to summary
private final long data
DEFAULT_BUFSIZEback to summary
private static final int DEFAULT_BUFSIZE
formDataElementsback to summary
private FormDataElement[] formDataElements
headersback to summary
private final String headers
HTTP_CLIENTback to summary
private static final HttpClient HTTP_CLIENT
loggerback to summary
private static final PlatformLogger logger
methodback to summary
private String method
responseback to summary
private final CompletableFuture<Void> response
urlback to summary
private String url
webPageback to summary
private final WebPage webPage

Constructor Detail

HTTP2Loaderback to summary
private HTTP2Loader(WebPage webPage, ByteBufferPool byteBufferPool, boolean asynchronous, String url, String method, String headers, FormDataElement[] formDataElements, long data)

Method Detail

callBackIfNotCanceledback to summary
private void callBackIfNotCanceled(final Runnable r)
copyToDirectBufferback to summary
private ByteBuffer copyToDirectBuffer(final ByteBuffer bb)
createback to summary
pack-priv static HTTP2Loader create(WebPage webPage, ByteBufferPool byteBufferPool, boolean asynchronous, String url, String method, String headers, FormDataElement[] formDataElements, long data)

Creates a new HTTP2Loader.

createNormalBodySubscriberback to summary
private HttpResponse.BodySubscriber<Void> createNormalBodySubscriber()
createZIPEncodedBodySubscriberback to summary
private HttpResponse.BodySubscriber<Void> createZIPEncodedBodySubscriber(final String contentEncoding)
createZIPStreamback to summary
private InputStream createZIPStream(final String type, InputStream in) throws IOException
didFailback to summary
private Void didFail(final Throwable th)
didFinishLoadingback to summary
private void didFinishLoading()
didReceiveDataback to summary
private void didReceiveData(final byte[] bytes, int size)
didReceiveDataback to summary
private void didReceiveData(final List<ByteBuffer> bytes)
didReceiveResponseback to summary
private void didReceiveResponse(final HttpResponse.ResponseInfo rsp)
didSendDataback to summary
private void didSendData(final long totalBytesSent, final long totalBytesToBeSent)
fwkCancelback to summary
public void fwkCancel()

Implements abstract com.sun.webkit.network.URLLoaderBase.fwkCancel.

Cancels this loader.

Annotations
@Override
getBodySubscriberback to summary
private HttpResponse.BodySubscriber<Void> getBodySubscriber(final String contentEncoding)
getContentEncodingback to summary
private static String getContentEncoding(final HttpResponse.ResponseInfo rsp)
getContentLengthback to summary
private static long getContentLength(final HttpResponse.ResponseInfo rsp)
getContentTypeback to summary
private static String getContentType(final HttpResponse.ResponseInfo rsp)
getCustomHeadersback to summary
private String[] getCustomHeaders()
getDirectBufferback to summary
private ByteBuffer getDirectBuffer(int size)
getFormDataPublisherback to summary
private HttpRequest.BodyPublisher getFormDataPublisher()
getHeadersAsStringback to summary
private static String getHeadersAsString(final HttpResponse.ResponseInfo rsp)
getRequestHeadersback to summary
private String[] getRequestHeaders()
handleRedirectionIfNeededback to summary
private boolean handleRedirectionIfNeeded(final HttpResponse.ResponseInfo rsp)
notifyDidFailback to summary
private void notifyDidFail(int errorCode, String url, String message)
notifyDidFinishLoadingback to summary
private void notifyDidFinishLoading()
notifyDidReceiveDataback to summary
private void notifyDidReceiveData(ByteBuffer byteBuffer)
notifyDidSendDataback to summary
private void notifyDidSendData(long totalBytesSent, long totalBytesToBeSent)
toURIback to summary
private URI toURI() throws MalformedURLException
waitForRequestToCompleteback to summary
private void waitForRequestToComplete()
willSendRequestback to summary
private void willSendRequest(final HttpResponse.ResponseInfo rsp)