public class ManagedImportRequestI extends ImportRequest implements IRequest
FilesetJobLink instances which need to be handled
on the server-side. This will primarily provide the step-location required
by Handle by calling back to the
ManagedImportProcessI object.| Modifier and Type | Field and Description |
|---|---|
HandlePrx |
handle
Set by ManagedImportProcessI when verifyUpload has been called.
|
__ids, activity, clientUuid, location, logFile, process, repoUuid, settings| Constructor and Description |
|---|
ManagedImportRequestI(Registry reg,
ome.io.nio.TileSizes sizes,
RepositoryDao dao,
OMEROWrapper wrapper,
java.lang.String token) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildResponse(int step,
java.lang.Object object)
Post-transaction chance to map from the return value of
IRequest.step(int) to a Response object. |
void |
finish()
Method within the transaction boundaries after all processing has
occurred.
|
java.lang.Object |
generateThumbnails(ThumbnailGenerationJob tgj) |
java.util.Map<java.lang.String,java.lang.String> |
getCallContext()
Returns the desired call context for this request.
|
Response |
getResponse()
Returns the current response value.
|
java.util.Map<java.lang.String,java.util.List<IObject>> |
importMetadata(MetadataImportJob mij)
Uses the
OMEROMetadataStoreClient to save all metadata for the
current image provided. |
java.lang.Object |
index(IndexingJob ij) |
void |
init(Helper helper)
Method called within the transaction boundaries before any processing occurs.
|
java.security.MessageDigest |
parseData(java.lang.String fileName,
int series,
ImportSize size)
Parse the binary data to generate min/max values and
allow an md to be calculated.
|
java.lang.Object |
pixelData(PixelDataJob pdj) |
protected void |
registerKeepAlive()
If the
setResources(Resources) has been called with a
non-null value, then create an Resources.Entry which will ping the
ServiceFactoryPrx instance periodically to keep the import
from timing out. |
java.lang.Object |
script(ScriptJob sj) |
void |
setCallContext(java.util.Map<java.lang.String,java.lang.String> callContext) |
void |
setResources(Resources resources)
Late injection to not break the constructor
|
java.lang.Object |
step(int step)
Single uncancellable action which will be performed by this IRequest.
|
__readImpl, __writeImpl, clone, ice_factory, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticIdpublic HandlePrx handle
public ManagedImportRequestI(Registry reg, ome.io.nio.TileSizes sizes, RepositoryDao dao, OMEROWrapper wrapper, java.lang.String token)
public void setResources(Resources resources)
public void setCallContext(java.util.Map<java.lang.String,java.lang.String> callContext)
callContext - the call context to setpublic java.util.Map<java.lang.String,java.lang.String> getCallContext()
IRequestMap as desired.getCallContext in interface IRequestpublic void init(Helper helper)
IRequestStatus object by calling Helper.setSteps(int). This count
will define how many times the IRequest.step(int) method will be called.
The Helper instance passed in contains those resources needed by
IRequests to interact with data and should be stored for later use.protected void registerKeepAlive()
setResources(Resources) has been called with a
non-null value, then create an Resources.Entry which will ping the
ServiceFactoryPrx instance periodically to keep the import
from timing out. This is especially important for autoClose imports
since no other client is likely to keep them alive.
If the ping fails, then the Resources.Entry returns null which will
remove the instance for the Resources object. Otherwise,
during cleanup() remove will be called explicitly.public java.lang.Object step(int step)
IRequestIRequest.buildResponse(int, Object) for conversion and storage.public void finish()
throws HandleI.Cancel
IRequestHandleI.Cancel will still rollback the current
transaction.finish in interface IRequestHandleI.Cancel - if this request is cancelledpublic void buildResponse(int step,
java.lang.Object object)
IRequestIRequest.step(int) to a Response object.buildResponse in interface IRequeststep - the step numberobject - an object to be used in building the responsepublic Response getResponse()
IRequestgetResponse in interface IRequestpublic java.util.Map<java.lang.String,java.util.List<IObject>> importMetadata(MetadataImportJob mij) throws java.lang.Throwable
OMEROMetadataStoreClient to save all metadata for the
current image provided.mij - Object hosting metadata to save.Pixels id.loci.formats.FormatException - if there is an error parsing metadata.java.io.IOException - if there is an error reading the file.java.lang.Throwablepublic java.lang.Object pixelData(PixelDataJob pdj) throws java.lang.Throwable
java.lang.Throwablepublic java.lang.Object generateThumbnails(ThumbnailGenerationJob tgj) throws java.lang.Throwable
java.lang.Throwablepublic java.lang.Object index(IndexingJob ij)
public java.lang.Object script(ScriptJob sj)
public java.security.MessageDigest parseData(java.lang.String fileName,
int series,
ImportSize size)
throws loci.formats.FormatException,
java.io.IOException,
ServerError
series - loci.formats.FormatExceptionjava.io.IOExceptionServerError