public class DefaultVerificationPolicy extends Object implements VerificationPolicy
VerificationPolicy
that should be a valid policy under most circumstances where
at least the hash and last modification date of a resource are given by Sources and these attributes
are verifiable by the Destination.Constructor and Description |
---|
DefaultVerificationPolicy() |
Modifier and Type | Method and Description |
---|---|
boolean |
continueVerification(VerificationStatus stHash,
VerificationStatus stLastMod,
VerificationStatus stSize)
Should successive verifications go on, given the status of verifications.
|
boolean |
isVerified(VerificationStatus stHash,
VerificationStatus stLastMod,
VerificationStatus stSize)
Can the resource be marked as verified, given the status of verifications.
|
boolean |
repeatDownload(VerificationStatus stHash,
VerificationStatus stLastMod,
VerificationStatus stSize)
Should we repeat the download of a resource, given the status of verifications.
|
public boolean continueVerification(VerificationStatus stHash, VerificationStatus stLastMod, VerificationStatus stSize)
VerificationPolicy
continueVerification
in interface VerificationPolicy
stHash
- VerificationStatus
of hash of resourcestLastMod
- VerificationStatus
of last modified date of resourcestSize
- VerificationStatus
of the size of the resourcetrue
if verification should continue, false
otherwisepublic boolean repeatDownload(VerificationStatus stHash, VerificationStatus stLastMod, VerificationStatus stSize)
VerificationPolicy
repeatDownload
in interface VerificationPolicy
stHash
- VerificationStatus
of hash of resourcestLastMod
- VerificationStatus
of last modified date of resourcestSize
- VerificationStatus
of the size of the resourcetrue
if download should be repeated, false
otherwisepublic boolean isVerified(VerificationStatus stHash, VerificationStatus stLastMod, VerificationStatus stSize)
VerificationPolicy
isVerified
in interface VerificationPolicy
stHash
- VerificationStatus
of hash of resourcestLastMod
- VerificationStatus
of last modified date of resourcestSize
- VerificationStatus
of the size of the resourcetrue
if resource should be marked as verified, false
otherwiseCopyright © 2017. All rights reserved.