|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.aether.util.listener.DefaultTransferResource
public class DefaultTransferResource
A simple transfer resource.
Constructor Summary | |
---|---|
DefaultTransferResource(String repositoryUrl,
String resourceName,
File file)
Deprecated. Use DefaultTransferResource(String, String, File, RequestTrace) instead. |
|
DefaultTransferResource(String repositoryUrl,
String resourceName,
File file,
RequestTrace trace)
Creates a new transfer resource with the specified properties. |
Method Summary | |
---|---|
long |
getContentLength()
The size of the resource in bytes. |
File |
getFile()
Gets the local file being uploaded or downloaded. |
String |
getRepositoryUrl()
The base URL of the repository, e.g. |
String |
getResourceName()
The path of the resource relative to the repository's base URL, e.g. |
RequestTrace |
getTrace()
Gets the trace information that describes the higher level request/operation during which this resource is transferred. |
long |
getTransferStartTime()
Gets the timestamp when the transfer of this resource was started. |
DefaultTransferResource |
setContentLength(long contentLength)
Sets the size of the resource in bytes. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public DefaultTransferResource(String repositoryUrl, String resourceName, File file)
DefaultTransferResource(String, String, File, RequestTrace)
instead.
repositoryUrl
- The base URL of the repository, may be null
or empty if unknown. If not empty, a
trailing slash will automatically be added if missing.resourceName
- The relative path to the resource within the repository, may be null
. A leading slash
(if any) will be automatically removed.file
- The source/target file involved in the transfer, may be null
.public DefaultTransferResource(String repositoryUrl, String resourceName, File file, RequestTrace trace)
repositoryUrl
- The base URL of the repository, may be null
or empty if unknown. If not empty, a
trailing slash will automatically be added if missing.resourceName
- The relative path to the resource within the repository, may be null
. A leading slash
(if any) will be automatically removed.file
- The source/target file involved in the transfer, may be null
.trace
- The trace information, may be null
.Method Detail |
---|
public String getRepositoryUrl()
TransferResource
getRepositoryUrl
in interface TransferResource
null
.public String getResourceName()
TransferResource
getResourceName
in interface TransferResource
null
.public File getFile()
TransferResource
getFile
in interface TransferResource
null
if none.public long getContentLength()
TransferResource
getContentLength
in interface TransferResource
public DefaultTransferResource setContentLength(long contentLength)
contentLength
- The size of the resource in bytes or a negative value if unknown.
null
.public long getTransferStartTime()
TransferResource
getTransferStartTime
in interface TransferResource
public RequestTrace getTrace()
TransferResource
getTrace
in interface TransferResource
null
if none.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |