public final class TransferEvent extends Object
TransferListener
,
TransferEvent.Builder
Modifier and Type | Class and Description |
---|---|
static class |
TransferEvent.Builder
A builder to create transfer events.
|
static class |
TransferEvent.EventType
The type of the event.
|
static class |
TransferEvent.RequestType
The type of the request/transfer being performed.
|
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getDataBuffer()
Gets the byte buffer holding the transferred bytes since the last event.
|
int |
getDataLength()
Gets the number of bytes that have been transferred since the last event.
|
Exception |
getException()
Gets the error that occurred during the transfer.
|
TransferEvent.RequestType |
getRequestType()
Gets the type of the request/transfer.
|
TransferResource |
getResource()
Gets the resource that is being transferred.
|
RepositorySystemSession |
getSession()
Gets the repository system session during which the event occurred.
|
long |
getTransferredBytes()
Gets the total number of bytes that have been transferred since the download/upload of the resource was started.
|
TransferEvent.EventType |
getType()
Gets the type of the event.
|
String |
toString() |
public TransferEvent.EventType getType()
null
.public TransferEvent.RequestType getRequestType()
null
.public RepositorySystemSession getSession()
null
.public TransferResource getResource()
null
.public long getTransferredBytes()
getDataLength()
,
TransferResource.getResumeOffset()
public ByteBuffer getDataBuffer()
null
if not applicable to the event, i.e. if the event type is not
TransferEvent.EventType.PROGRESSED
.public int getDataLength()
getTransferredBytes()
public Exception getException()
null
if none.Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.