Package org.asynchttpclient.handler
Interface ProgressAsyncHandler<T>
-
- All Superinterfaces:
AsyncHandler<T>
- All Known Implementing Classes:
AsyncCompletionHandler
,AsyncCompletionHandlerBase
,TransferCompletionHandler
public interface ProgressAsyncHandler<T> extends AsyncHandler<T>
An extendedAsyncHandler
with two extra callback who get invoked during the content upload to a remote server. ThisAsyncHandler
must be used only with PUT and POST request.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.asynchttpclient.AsyncHandler
AsyncHandler.State
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AsyncHandler.State
onContentWriteProgress(long amount, long current, long total)
Invoked when the I/O operation associated with theRequest
body wasn't fully written in a single I/O write operation.AsyncHandler.State
onContentWritten()
Invoked when the content (aFile
,String
orFileInputStream
has been fully written on the I/O socket.AsyncHandler.State
onHeadersWritten()
Invoked when the content (aFile
,String
orFileInputStream
has been fully written on the I/O socket.-
Methods inherited from interface org.asynchttpclient.AsyncHandler
onBodyPartReceived, onCompleted, onConnectionOffer, onConnectionPoolAttempt, onConnectionPooled, onHeadersReceived, onHostnameResolutionAttempt, onHostnameResolutionFailure, onHostnameResolutionSuccess, onRequestSend, onRetry, onStatusReceived, onTcpConnectAttempt, onTcpConnectFailure, onTcpConnectSuccess, onThrowable, onTlsHandshakeAttempt, onTlsHandshakeFailure, onTlsHandshakeSuccess, onTrailingHeadersReceived
-
-
-
-
Method Detail
-
onHeadersWritten
AsyncHandler.State onHeadersWritten()
Invoked when the content (aFile
,String
orFileInputStream
has been fully written on the I/O socket.- Returns:
- a
AsyncHandler.State
telling to CONTINUE or ABORT the current processing.
-
onContentWritten
AsyncHandler.State onContentWritten()
Invoked when the content (aFile
,String
orFileInputStream
has been fully written on the I/O socket.- Returns:
- a
AsyncHandler.State
telling to CONTINUE or ABORT the current processing.
-
onContentWriteProgress
AsyncHandler.State onContentWriteProgress(long amount, long current, long total)
Invoked when the I/O operation associated with theRequest
body wasn't fully written in a single I/O write operation. This method is never invoked if the write operation complete in a sinfle I/O write.- Parameters:
amount
- The amount of bytes to transfer.current
- The amount of bytes transferredtotal
- The total number of bytes transferred- Returns:
- a
AsyncHandler.State
telling to CONTINUE or ABORT the current processing.
-
-