Class FileTransporter
- java.lang.Object
-
- org.eclipse.aether.spi.connector.transport.AbstractTransporter
-
- org.eclipse.aether.transport.file.FileTransporter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Transporter
final class FileTransporter extends AbstractTransporter
A transporter usingFile.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Filebasedirprivate static org.slf4j.LoggerLOGGER-
Fields inherited from interface org.eclipse.aether.spi.connector.transport.Transporter
ERROR_NOT_FOUND, ERROR_OTHER
-
-
Constructor Summary
Constructors Constructor Description FileTransporter(RemoteRepository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intclassify(java.lang.Throwable error)Classifies the type of exception that has been thrown from a previous request to the transporter.(package private) java.io.FilegetBasedir()private java.io.FilegetFile(TransportTask task, boolean required)protected voidimplClose()ImplementsAbstractTransporter.close(), gets only called if the transporter has not already been closed.protected voidimplGet(GetTask task)ImplementsAbstractTransporter.get(GetTask), gets only called if the transporter has not been closed.protected voidimplPeek(PeekTask task)ImplementsAbstractTransporter.peek(PeekTask), gets only called if the transporter has not been closed.protected voidimplPut(PutTask task)ImplementsAbstractTransporter.put(PutTask), gets only called if the transporter has not been closed.
-
-
-
Constructor Detail
-
FileTransporter
FileTransporter(RemoteRepository repository) throws NoTransporterException
- Throws:
NoTransporterException
-
-
Method Detail
-
getBasedir
java.io.File getBasedir()
-
classify
public int classify(java.lang.Throwable error)
Description copied from interface:TransporterClassifies the type of exception that has been thrown from a previous request to the transporter. The exception types employed by a transporter are generally unknown to its caller. Where a caller needs to distinguish between certain error cases, it employs this method to detect which error case corresponds to the exception.- Parameters:
error- The exception to classify, must not benull.- Returns:
- The classification of the error, either
Transporter.ERROR_NOT_FOUNDorTransporter.ERROR_OTHER.
-
implPeek
protected void implPeek(PeekTask task) throws java.lang.Exception
Description copied from class:AbstractTransporterImplementsAbstractTransporter.peek(PeekTask), gets only called if the transporter has not been closed.- Specified by:
implPeekin classAbstractTransporter- Parameters:
task- The existence check to perform, must not benull.- Throws:
java.lang.Exception- If the existence of the specified resource could not be confirmed.
-
implGet
protected void implGet(GetTask task) throws java.lang.Exception
Description copied from class:AbstractTransporterImplementsAbstractTransporter.get(GetTask), gets only called if the transporter has not been closed.- Specified by:
implGetin classAbstractTransporter- Parameters:
task- The download to perform, must not benull.- Throws:
java.lang.Exception- If the transfer failed.
-
implPut
protected void implPut(PutTask task) throws java.lang.Exception
Description copied from class:AbstractTransporterImplementsAbstractTransporter.put(PutTask), gets only called if the transporter has not been closed.- Specified by:
implPutin classAbstractTransporter- Parameters:
task- The upload to perform, must not benull.- Throws:
java.lang.Exception- If the transfer failed.
-
getFile
private java.io.File getFile(TransportTask task, boolean required) throws java.lang.Exception
- Throws:
java.lang.Exception
-
implClose
protected void implClose()
Description copied from class:AbstractTransporterImplementsAbstractTransporter.close(), gets only called if the transporter has not already been closed.- Specified by:
implClosein classAbstractTransporter
-
-