final class FileTransporter extends AbstractTransporter
File
.Modifier and Type | Field and Description |
---|---|
private java.io.File |
basedir |
private static org.slf4j.Logger |
LOGGER |
ERROR_NOT_FOUND, ERROR_OTHER
Constructor and Description |
---|
FileTransporter(RemoteRepository repository) |
Modifier and Type | Method and Description |
---|---|
int |
classify(java.lang.Throwable error)
Classifies the type of exception that has been thrown from a previous request to the transporter.
|
(package private) java.io.File |
getBasedir() |
private java.io.File |
getFile(TransportTask task,
boolean required) |
protected void |
implClose()
Implements
AbstractTransporter.close() , gets only called if the transporter has not already been closed. |
protected void |
implGet(GetTask task)
Implements
AbstractTransporter.get(GetTask) , gets only called if the transporter has not been closed. |
protected void |
implPeek(PeekTask task)
Implements
AbstractTransporter.peek(PeekTask) , gets only called if the transporter has not been closed. |
protected void |
implPut(PutTask task)
Implements
AbstractTransporter.put(PutTask) , gets only called if the transporter has not been closed. |
private static final org.slf4j.Logger LOGGER
private final java.io.File basedir
FileTransporter(RemoteRepository repository) throws NoTransporterException
NoTransporterException
java.io.File getBasedir()
public int classify(java.lang.Throwable error)
Transporter
error
- The exception to classify, must not be null
.Transporter.ERROR_NOT_FOUND
or Transporter.ERROR_OTHER
.protected void implPeek(PeekTask task) throws java.lang.Exception
AbstractTransporter
AbstractTransporter.peek(PeekTask)
, gets only called if the transporter has not been closed.implPeek
in class AbstractTransporter
task
- The existence check to perform, must not be null
.java.lang.Exception
- If the existence of the specified resource could not be confirmed.protected void implGet(GetTask task) throws java.lang.Exception
AbstractTransporter
AbstractTransporter.get(GetTask)
, gets only called if the transporter has not been closed.implGet
in class AbstractTransporter
task
- The download to perform, must not be null
.java.lang.Exception
- If the transfer failed.protected void implPut(PutTask task) throws java.lang.Exception
AbstractTransporter
AbstractTransporter.put(PutTask)
, gets only called if the transporter has not been closed.implPut
in class AbstractTransporter
task
- The upload to perform, must not be null
.java.lang.Exception
- If the transfer failed.private java.io.File getFile(TransportTask task, boolean required) throws java.lang.Exception
java.lang.Exception
protected void implClose()
AbstractTransporter
AbstractTransporter.close()
, gets only called if the transporter has not already been closed.implClose
in class AbstractTransporter