public static class ResourceService.ReadResourceTask extends ResourceService.FetchResourceTask<UUID,File>
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log |
Constructor and Description |
---|
ResourceService.ReadResourceTask(InetSocketAddress addr,
UUID uuid,
File file) |
Modifier and Type | Method and Description |
---|---|
File |
call()
Return the
File on which the resource was written. |
UUID |
logId()
The logical identifier for the resource.
|
File |
logResource()
The resource.
|
transfer
public ResourceService.ReadResourceTask(InetSocketAddress addr, UUID uuid, File file)
addr
- The Internet address and port at which the service from
which the resource will be read is accepting connections.port
- The port at which to connect to the service from which the
resource will be read.uuid
- The UUID which identifies the desired resource.file
- The local file on which the received data will be written.
The file may exist but if it exists then it must be empty.public UUID logId()
ResourceService.FetchResourceTask
public File logResource()
ResourceService.FetchResourceTask
public File call() throws Exception
File
on which the resource was written. If the
operation fails, then the caller is responsible deciding whether or
not the File
specified to the constructor needs to be
deleted.IOException
- if the file exists and is not empty.IOException
- if another process has a lock on the file.Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.