org.sonatype.aether.transfer
Interface TransferResource

All Known Implementing Classes:
DefaultTransferResource

public interface TransferResource

Describes a resource being uploaded or downloaded by the repository system.

Author:
Benjamin Bentmann

Method Summary
 long getContentLength()
          The size of the resource in bytes.
 java.io.File getFile()
          Gets the local file being uploaded or downloaded.
 java.lang.String getRepositoryUrl()
          The base URL of the repository, e.g.
 java.lang.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.
 

Method Detail

getRepositoryUrl

java.lang.String getRepositoryUrl()
The base URL of the repository, e.g. "http://repo1.maven.org/maven2/". Unless the URL is unknown, it will be terminated by a trailing slash.

Returns:
The base URL of the repository or an empty string if unknown, never null.

getResourceName

java.lang.String getResourceName()
The path of the resource relative to the repository's base URL, e.g. "org/apache/maven/maven/3.0/maven-3.0.pom".

Returns:
The path of the resource, never null.

getFile

java.io.File getFile()
Gets the local file being uploaded or downloaded. When the repository system merely checks for the existence of a remote resource, no local file will be involved in the transfer.

Returns:
The source/target file involved in the transfer or null if none.

getContentLength

long getContentLength()
The size of the resource in bytes.

Returns:
The size of the resource in bytes or a negative value if unknown.

getTransferStartTime

long getTransferStartTime()
Gets the timestamp when the transfer of this resource was started.

Returns:
The timestamp when the transfer of this resource was started.

getTrace

RequestTrace getTrace()
Gets the trace information that describes the higher level request/operation during which this resource is transferred.

Returns:
The trace information about the higher level operation or null if none.


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.