
ch.sourcepond.io.checksum.api.UpdateObserver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checksum-api Show documentation
Show all versions of checksum-api Show documentation
Provides a simple API to calculate checksums for the content of any input-stream, file or directory.
/*Copyright (C) 2015 Roland Hauser,
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/
package ch.sourcepond.io.checksum.api;
import java.util.concurrent.TimeUnit;
/**
* A calculation observer will be informed when the calculation of checksum
* has been finished successfully. See {@link Resource#update(TimeUnit, long, UpdateObserver)}
* for further information.
*/
@FunctionalInterface
public interface UpdateObserver {
/**
* Triggered when the checksum calculation of a resource has been done. This will always be the case no
* matter if the update was successful or not.
*
* @param pUpdate Object which holds the result of a checksum update, never {@code null}
*/
void done(Update pUpdate);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy