public interface UrlRequestJob
Modifier and Type | Interface and Description |
---|---|
static interface |
UrlRequestJob.Id
An identifier of the
UrlRequestJob . |
static interface |
UrlRequestJob.Options
The options needed to initialize
UrlRequestJob . |
Modifier and Type | Method and Description |
---|---|
void |
complete()
Notifies the engine that all the response data chunks are written and the request should be
completed.
|
void |
fail()
Notifies the engine that an error occurred during writing the response data and the request
should be failed.
|
UrlRequestJob.Id |
id()
Returns the identifier of this URL request job.
|
void |
write(byte[] data)
Appends a chunk of the response data to the URL request.
|
UrlRequestJob.Id id()
void write(byte[] data)
complete()
or fail()
method must be called to indicate that the request is
completed or failed.data
- the response data bytesObjectClosedException
- when the URL request is already completed or failedvoid complete()
ObjectClosedException
- when the URL request is already completed or failedvoid fail()
ObjectClosedException
- when the URL request is already completed or failed