use of org.commonjava.maven.galley.testing.core.transport.job.TestDownload in project galley by Commonjava.
the class TestTransport method createDownloadJob.
// Transport implementation...
@Override
public DownloadJob createDownloadJob(final ConcreteResource resource, final Transfer target, final Map<Transfer, Long> transferSizes, final int timeoutSeconds, final EventMetadata eventMetadata) throws TransferException {
final TestDownload job = downloads.get(resource);
logger.info("Download for: {} is: {}", resource, job);
if (job == null) {
throw new TransferException("No download registered for the endpoint: {}", resource);
}
job.setTransfer(target);
job.setEventMetadata(eventMetadata);
return job;
}
Aggregations