Net API using HttpURLConnection, to be easily reused between the Android and Desktop
backends.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ObjectMap | |
| private final ThreadPoolExecutor | |
| pack-priv final ObjectMap | |
| pack-priv final ObjectMap |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| pack-priv synchronized Net. | |
| public boolean | |
| pack-priv synchronized void | putIntoConnectionsAndListeners(final Net.
|
| pack-priv synchronized void | |
| public void | sendHttpRequest(final Net.
|
| connections | back to summary |
|---|---|
| pack-priv final ObjectMap<Net. | |
| executorService | back to summary |
|---|---|
| private final ThreadPoolExecutor executorService | |
| listeners | back to summary |
|---|---|
| pack-priv final ObjectMap<Net. | |
| tasks | back to summary |
|---|---|
| pack-priv final ObjectMap<Net. | |
| NetJavaImpl | back to summary |
|---|---|
| public NetJavaImpl() | |
| NetJavaImpl | back to summary |
|---|---|
| public NetJavaImpl(int maxThreads) | |
| cancelHttpRequest | back to summary |
|---|---|
| public void cancelHttpRequest(Net. | |
| cancelTask | back to summary |
|---|---|
| private void cancelTask(Net. | |
| getFromListeners | back to summary |
|---|---|
| pack-priv synchronized Net. | |
| isHttpRequestPending | back to summary |
|---|---|
| public boolean isHttpRequestPending(Net. | |
| putIntoConnectionsAndListeners | back to summary |
|---|---|
| pack-priv synchronized void putIntoConnectionsAndListeners(final Net. | |
| removeFromConnectionsAndListeners | back to summary |
|---|---|
| pack-priv synchronized void removeFromConnectionsAndListeners(final Net. | |
| sendHttpRequest | back to summary |
|---|---|
| public void sendHttpRequest(final Net. | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpURLConnection | |
| private HttpStatus |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getHeader(String name)
Implements com. Returns the value of the header with the given name as a |
| public Map | |
| private InputStream | |
| public byte[] | getResult()
Implements com. Returns the data of the HTTP response as a byte[]. |
| public InputStream | getResultAsStream()
Implements com. Returns the data of the HTTP response as an |
| public String | getResultAsString()
Implements com. Returns the data of the HTTP response as a |
| public HttpStatus | getStatus()
Implements com. Returns the |
| connection | back to summary |
|---|---|
| private final HttpURLConnection connection | |
| status | back to summary |
|---|---|
| private HttpStatus status | |
| HttpClientResponse | back to summary |
|---|---|
| public HttpClientResponse(HttpURLConnection connection) throws IOException | |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) Implements com. Doc from com. Returns the value of the header with the given name as a
| |
| getHeaders | back to summary |
|---|---|
| public Map Implements com. Doc from com. Returns a Map of the headers. The keys are Strings that represent the header name. Each values is a List of Strings that
represent the corresponding header values. See
| |
| getInputStream | back to summary |
|---|---|
| private InputStream getInputStream() | |
| getResult | back to summary |
|---|---|
| public byte[] getResult() Implements com. Doc from com. Returns the data of the HTTP response as a byte[]. Note This method may only be called once per response.
| |
| getResultAsStream | back to summary |
|---|---|
| public InputStream getResultAsStream() Implements com. Doc from com. Returns the data of the HTTP response as an Warning
Do not store a reference to this InputStream outside of
| |
| getResultAsString | back to summary |
|---|---|
| public String getResultAsString() Implements com. Doc from com. Returns the data of the HTTP response as a Note This method may only be called once per response.
| |
| getStatus | back to summary |
|---|---|
| public HttpStatus getStatus() Implements com. Doc from com. Returns the
| |