public class ManagedImportProcessI extends AbstractCloseableAmdServant implements _ImportProcessOperations, ServiceFactoryAware, ProcessContainer.Process
Constructor and Description |
---|
ManagedImportProcessI(ManagedRepositoryI repo,
Fileset fs,
ImportLocation location,
ImportSettings settings,
Ice.Current __current,
java.lang.String rootToken)
Create and register a servant for servicing the import process
within a managed repository.
|
Modifier and Type | Method and Description |
---|---|
void |
closeCalled(int idx) |
Fileset |
getFileset() |
long |
getGroup() |
HandlePrx |
getHandle(Ice.Current ignore)
Reacquire the handle which was returned by
verifyUpload . |
ImportSettings |
getImportSettings(Ice.Current __current) |
ImportProcessPrx |
getProxy() |
RawFileStorePrx |
getUploader(int i,
Ice.Current current)
Step 1: Returns a RawFileStore that can be used to upload one of
the used files.
|
long |
getUploadOffset(int idx,
Ice.Current ignore)
In case an upload must be resumed, this provides the
location of the last successful upload.
|
void |
ping() |
protected void |
postClose(Ice.Current current)
Should not throw any exceptions which should be detected by clients
since it is called in a finally block after the client thread has been
released.
|
protected void |
preClose(Ice.Current current) |
protected void |
registerCallback(RawFileStorePrx prx,
int idx) |
protected ImportProcessPrx |
registerProxy(Ice.Current ignore)
Adds this instance to the current session so that clients can communicate
with it.
|
void |
setOffset(int idx,
long offset) |
void |
setServiceFactory(ServiceFactoryI sf) |
void |
shutdown() |
HandlePrx |
verifyUpload(java.util.List<java.lang.String> hashes,
Ice.Current __current)
Step 2: Passes a set of client-side calculated hashes to the
server for verifying that all of the files were correctly
uploaded.
|
close_async, close
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate_async, close_async, getCurrentEventContext_async, passivate_async
public ManagedImportProcessI(ManagedRepositoryI repo, Fileset fs, ImportLocation location, ImportSettings settings, Ice.Current __current, java.lang.String rootToken) throws ServerError
ServerError
public void setServiceFactory(ServiceFactoryI sf) throws ServerError
setServiceFactory
in interface ServiceFactoryAware
ServerError
protected ImportProcessPrx registerProxy(Ice.Current ignore) throws ServerError
ServerError
public ImportProcessPrx getProxy()
getProxy
in interface ProcessContainer.Process
public Fileset getFileset()
getFileset
in interface ProcessContainer.Process
public ImportSettings getImportSettings(Ice.Current __current)
getImportSettings
in interface _ImportProcessOperations
public long getGroup()
getGroup
in interface ProcessContainer.Process
public void ping()
ping
in interface ProcessContainer.Process
public void shutdown()
shutdown
in interface ProcessContainer.Process
public RawFileStorePrx getUploader(int i, Ice.Current current) throws ServerError
_ImportProcessOperations
ImportLocation
. omero.api.RawFileStore.close
should be called once all data has been transferred. If the
file must be re-written, call getUploader
with the
same index again. Once all uploads have been completed,
verifyUpload
should be called to initiate background
processinggetUploader
in interface _ImportProcessOperations
current
- The Current object for the invocation.ServerError
protected void registerCallback(RawFileStorePrx prx, int idx)
public HandlePrx verifyUpload(java.util.List<java.lang.String> hashes, Ice.Current __current) throws ServerError
_ImportProcessOperations
Handle
proxy is returned, which completes all the necessary import
steps. A successful import will return an
ImportResponse
. Otherwise, some ERR
will be returned.verifyUpload
in interface _ImportProcessOperations
__current
- The Current object for the invocation.ServerError
public long getUploadOffset(int idx, Ice.Current ignore) throws ServerError
_ImportProcessOperations
getUploadOffset
in interface _ImportProcessOperations
ignore
- The Current object for the invocation.ServerError
public HandlePrx getHandle(Ice.Current ignore)
_ImportProcessOperations
verifyUpload
. This is useful in case a new
client is re-attaching to a running import.
From the Handle
instance, the
original ImportRequest
can also be found.getHandle
in interface _ImportProcessOperations
ignore
- The Current object for the invocation.public void setOffset(int idx, long offset)
public void closeCalled(int idx)
protected void preClose(Ice.Current current) throws java.lang.Throwable
preClose
in class AbstractCloseableAmdServant
java.lang.Throwable
protected void postClose(Ice.Current current)
AbstractCloseableAmdServant
postClose
in class AbstractCloseableAmdServant