Top Inners Fields Constructors Methods
com.sun.webkit.network

pack-priv final Class NetworkContext

extends Object
Class Inheritance
Static Imports
com.sun.webkit.network.URLs.newURL

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
NetworkContext.URLLoaderThreadFactory

Thread factory for URL loader threads.

Field Summary

Modifier and TypeField and Description
private static final int
BYTE_BUFFER_SIZE

The buffer size for the shared pool of byte buffers.

private static final ByteBufferPool
byteBufferPool

The shared pool of byte buffers.

private static final int
DEFAULT_HTTP2_MAX_CONNECTIONS

The default value of the maximum concurrent connections for new gen HTTP2 client

private static final int
DEFAULT_HTTP_MAX_CONNECTIONS

The default value of the "http.maxConnections" system property.

private static final PlatformLogger
private static final long
THREAD_POOL_KEEP_ALIVE_TIME

The thread pool keep alive time.

private static final int
THREAD_POOL_SIZE

The size of the thread pool for asynchronous loaders.

private static final ThreadPoolExecutor
threadPool

The thread pool used to execute asynchronous loaders.

private static final boolean
useHTTP2Loader

Can use HTTP2Loader

Constructor Summary

AccessConstructor and Description
private
NetworkContext()

Non-invocable constructor.

Method Summary

Modifier and TypeMethod and Description
private static boolean

Returns:

true if we can handle the url. false otherwise.
canHandleURL
(String
the String containing the url to check.
url
)

Checks whether a URL is valid or not.

private static int
fwkGetMaximumHTTPConnectionCountPerHost()

Returns the maximum allowed number of connections per host.

private static URLLoaderBase
fwkLoad(WebPage webPage, boolean asynchronous, String url, String method, String headers, FormDataElement[] formDataElements, long data)

Starts an asynchronous load or executes a synchronous one.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BYTE_BUFFER_SIZEback to summary
private static final int BYTE_BUFFER_SIZE

The buffer size for the shared pool of byte buffers.

byteBufferPoolback to summary
private static final ByteBufferPool byteBufferPool

The shared pool of byte buffers.

DEFAULT_HTTP2_MAX_CONNECTIONSback to summary
private static final int DEFAULT_HTTP2_MAX_CONNECTIONS

The default value of the maximum concurrent connections for new gen HTTP2 client

DEFAULT_HTTP_MAX_CONNECTIONSback to summary
private static final int DEFAULT_HTTP_MAX_CONNECTIONS

The default value of the "http.maxConnections" system property.

loggerback to summary
private static final PlatformLogger logger
THREAD_POOL_KEEP_ALIVE_TIMEback to summary
private static final long THREAD_POOL_KEEP_ALIVE_TIME

The thread pool keep alive time.

THREAD_POOL_SIZEback to summary
private static final int THREAD_POOL_SIZE

The size of the thread pool for asynchronous loaders.

threadPoolback to summary
private static final ThreadPoolExecutor threadPool

The thread pool used to execute asynchronous loaders.

useHTTP2Loaderback to summary
private static final boolean useHTTP2Loader

Can use HTTP2Loader

Constructor Detail

NetworkContextback to summary
private NetworkContext()

Non-invocable constructor.

Method Detail

canHandleURLback to summary
private static boolean canHandleURL(String url)

Checks whether a URL is valid or not. I.E. if we do have a protocol handler to deal with it.

Parameters
url:String

the String containing the url to check.

Returns:boolean

true if we can handle the url. false otherwise.

fwkGetMaximumHTTPConnectionCountPerHostback to summary
private static int fwkGetMaximumHTTPConnectionCountPerHost()

Returns the maximum allowed number of connections per host.

fwkLoadback to summary
private static URLLoaderBase fwkLoad(WebPage webPage, boolean asynchronous, String url, String method, String headers, FormDataElement[] formDataElements, long data)

Starts an asynchronous load or executes a synchronous one.

com.sun.webkit.network back to summary

private final Class NetworkContext.URLLoaderThreadFactory

extends Object
implements ThreadFactory
Class Inheritance
All Implemented Interfaces
java.util.concurrent.ThreadFactory

Thread factory for URL loader threads.

Field Summary

Modifier and TypeField and Description
private final ThreadGroup
private final AtomicInteger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Thread
newThread(Runnable
a runnable to be executed by new thread instance
r
)

Implements java.util.concurrent.ThreadFactory.newThread.

Constructs a new unstarted Thread to run the given runnable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

groupback to summary
private final ThreadGroup group
indexback to summary
private final AtomicInteger index

Constructor Detail

URLLoaderThreadFactoryback to summary
private URLLoaderThreadFactory()

Method Detail

newThreadback to summary
public Thread newThread(Runnable r)

Implements java.util.concurrent.ThreadFactory.newThread.

Doc from java.util.concurrent.ThreadFactory.newThread.

Constructs a new unstarted Thread to run the given runnable.

Parameters
r:Runnable

a runnable to be executed by new thread instance

Returns:Thread

constructed thread, or null if the request to create a thread is rejected

Annotations
@Override