final class ClasspathTransporter extends AbstractTransporter
Modifier and Type | Field and Description |
---|---|
private java.lang.ClassLoader |
classLoader |
private java.lang.String |
resourceBase |
ERROR_NOT_FOUND, ERROR_OTHER
Constructor and Description |
---|
ClasspathTransporter(RepositorySystemSession session,
RemoteRepository repository,
Logger logger) |
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.
|
private java.net.URL |
getResource(TransportTask task) |
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 final java.lang.String resourceBase
private final java.lang.ClassLoader classLoader
public ClasspathTransporter(RepositorySystemSession session, RemoteRepository repository, Logger logger) throws NoTransporterException
NoTransporterException
private java.net.URL getResource(TransportTask task) throws java.lang.Exception
java.lang.Exception
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.protected void implClose()
AbstractTransporter
AbstractTransporter.close()
, gets only called if the transporter has not already been closed.implClose
in class AbstractTransporter