Package io.milton.zsync
Class ZSyncResourceFactory
java.lang.Object
io.milton.zsync.ZSyncResourceFactory
- All Implemented Interfaces:
ResourceFactory
This resource factory allows resouces to be retrieved and updated using the
zsync protocol.
Client side process for updating a local file from a server file a) assume
the remote file is at path /somefile b) retrieve zsync metadata (ie headers
and checksums) GET /somefile/.zsync c) implement rolling checksums and
retrieve ranges of real file as needed with partial GETs GET /somefile
Ranges: x-y, n-m, etc d) merge the partial ranges
Client side process for updating a server file with a local file a) assume
the remote file is at path /somefile b) retrieve zsync metadata (ie headers
and checksums) GET /somefile/.zsync c) Calculate instructions and range data
to send to server, based on the retrieved checksums d) send to server
....
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ZSyncResourceFactory
-
-
Method Details
-
getResource
public Resource getResource(String host, String path) throws NotAuthorizedException, BadRequestException - Specified by:
getResourcein interfaceResourceFactory- Throws:
NotAuthorizedExceptionBadRequestException
-
getSuffix
-
setSuffix
-
getWrapped
-