final class NetworkContext
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
NetworkContext.URLLoaderThreadFactory
Thread factory for URL loader threads.
|
Modifier and Type | Field and Description |
---|---|
private static int |
BYTE_BUFFER_SIZE
The buffer size for the shared pool of byte buffers.
|
private static ByteBufferPool |
byteBufferPool
The shared pool of byte buffers.
|
private static int |
DEFAULT_HTTP_MAX_CONNECTIONS
The default value of the "http.maxConnections" system property.
|
private static java.util.logging.Logger |
logger |
private static long |
THREAD_POOL_KEEP_ALIVE_TIME
The thread pool keep alive time.
|
private static int |
THREAD_POOL_SIZE
The size of the thread pool for asynchronous loaders.
|
private static java.util.concurrent.ThreadPoolExecutor |
threadPool
The thread pool used to execute asynchronous loaders.
|
Modifier | Constructor and Description |
---|---|
private |
NetworkContext()
Non-invocable constructor.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
canHandleURL(java.lang.String url)
Checks whether a URL is valid or not.
|
private static int |
fwkGetMaximumHTTPConnectionCountPerHost()
Returns the maximum allowed number of connections per host.
|
private static URLLoader |
fwkLoad(WebPage webPage,
boolean asynchronous,
java.lang.String url,
java.lang.String method,
java.lang.String headers,
FormDataElement[] formDataElements,
long data)
Starts an asynchronous load or executes a synchronous one.
|
private static final java.util.logging.Logger logger
private static final int THREAD_POOL_SIZE
private static final long THREAD_POOL_KEEP_ALIVE_TIME
private static final int DEFAULT_HTTP_MAX_CONNECTIONS
private static final int BYTE_BUFFER_SIZE
private static final java.util.concurrent.ThreadPoolExecutor threadPool
private static final ByteBufferPool byteBufferPool
private static boolean canHandleURL(java.lang.String url)
url
- the String
containing the url to check.true
if we can handle the url. false
otherwise.private static URLLoader fwkLoad(WebPage webPage, boolean asynchronous, java.lang.String url, java.lang.String method, java.lang.String headers, FormDataElement[] formDataElements, long data)
private static int fwkGetMaximumHTTPConnectionCountPerHost()