Developper documentation¶
Business Classes : the EJB of WIDE
h3. The data transfer service¶
data_transfer_service EJB aim to provide a request system to process upload files. It uses the imageDatabase as a container for upload request that client can access to request uploads. The cicero upload daemon will do the effective upload with a low bandwidth usage.
Interface of the upload service
¶
Typical use of the interface¶
1. Connecting to the EJB¶
InitialContext ctx = new InitialContext();
uploadService = (UploadService) ctx.lookup("fr.cnrs.mri.service.transfer.UploadService");
2. Retrieving the next file to process¶
FileUploadInformation fileUploadInformation = uploadService.getNextUploadInformation("localhost");
The getNextUploadInformation
return the actives upload request (i.e. the request which status is "created", "pending" or "running") for a host. This method return a FileUploadInformation
object which gather information from UploadStatus
, FileReference
and UploadRequest
.
The persitence class
¶