public interface TransportResponse
| Modifier and Type | Method and Description |
|---|---|
Throwable |
error()
Will contain the
Throwable in the case an error is encountered transferring the bytes to the target
system. |
default void |
onSuccess(org.dataconservancy.pass.model.Submission submission,
org.dataconservancy.pass.model.Deposit deposit,
org.dataconservancy.pass.model.RepositoryCopy repositoryCopy)
Invoked as a callback by Deposit Services after creating or updating PASS repository resources related to the
successful transfer of bytes by a Transport.
|
boolean |
success()
Whether or not transferring the stream of bytes to the target destination succeeded without error.
|
boolean success()
error() can be invoked to retrieve the stack trace.false if there was an error transferring the byte stream to the target systemThrowable error()
Throwable in the case an error is encountered transferring the bytes to the target
system.nulldefault void onSuccess(org.dataconservancy.pass.model.Submission submission,
org.dataconservancy.pass.model.Deposit deposit,
org.dataconservancy.pass.model.RepositoryCopy repositoryCopy)
success() must return true for this
callback to be invoked.
Implementations should not assume that the invocation of onSuccess(...) implies logical success;
nothing should be inferred with respect to the custody of materials. onSuccess(...) is invoked on
physical success, but that does not imply that a transfer of custody has taken place.
Implementations may interrogate and update the PASS repository resources that are supplied by method parameters. For example, a transport implementation may be able to provide identifiers or other metadata that may be useful to record in PASS.
submission - deposit - repositoryCopy - Copyright © 2020. All rights reserved.