Package ome.services.blitz.impl
Class ExporterI
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.AbstractCloseableAmdServant
-
- ome.services.blitz.impl.ExporterI
-
- All Implemented Interfaces:
BlitzOnly
,ServiceFactoryAware
,_ExporterOperations
,_ServiceInterfaceOperations
,_StatefulServiceInterfaceOperations
,CloseableServant
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class ExporterI extends AbstractCloseableAmdServant implements _ExporterOperations, ServiceFactoryAware, BlitzOnly
Implementation of the Exporter service. This class uses a simple state machine.START -> waiting -> config -> output -> waiting -> config ...
- Since:
- 4.1
-
-
Field Summary
-
Fields inherited from class ome.services.blitz.impl.AbstractAmdServant
be, ctx, holder, invoker
-
-
Constructor Summary
Constructors Constructor Description ExporterI(BlitzExecutor be, ome.services.db.DatabaseIdentity databaseIdentity, ome.io.nio.PixelsService pixelsService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImage_async(AMD_Exporter_addImage __cb, long id, Ice.Current __current)
Adds a single image with basic metadata to the Exporter for inclusion on the next call to getBytes().loci.formats.meta.IMetadata
convertXml(loci.formats.meta.MetadataRetrieve retrieve)
void
generateTiff_async(AMD_Exporter_generateTiff __cb, Ice.Current __current)
Generates an OME-TIFF file.java.lang.String
generateXml(loci.formats.meta.MetadataRetrieve retrieve)
void
generateXml_async(AMD_Exporter_generateXml __cb, Ice.Current __current)
Generate XML and return the lengthprotected 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)
void
read_async(AMD_Exporter_read __cb, long pos, int size, Ice.Current __current)
Returnslength
bytes from the output file.void
setServiceFactory(ServiceFactoryI sf)
-
Methods inherited from class ome.services.blitz.impl.AbstractCloseableAmdServant
close, close_async
-
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface omero.api._StatefulServiceInterfaceOperations
activate_async, close_async, getCurrentEventContext_async, passivate_async
-
-
-
-
Constructor Detail
-
ExporterI
public ExporterI(BlitzExecutor be, ome.services.db.DatabaseIdentity databaseIdentity, ome.io.nio.PixelsService pixelsService) throws loci.common.services.DependencyException
- Throws:
loci.common.services.DependencyException
-
-
Method Detail
-
setServiceFactory
public void setServiceFactory(ServiceFactoryI sf) throws ServerError
- Specified by:
setServiceFactory
in interfaceServiceFactoryAware
- Throws:
ServerError
-
addImage_async
public void addImage_async(AMD_Exporter_addImage __cb, long id, Ice.Current __current) throws ServerError
Description copied from interface:_ExporterOperations
Adds a single image with basic metadata to the Exporter for inclusion on the next call to getBytes().- Specified by:
addImage_async
in interface_ExporterOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
generateXml_async
public void generateXml_async(AMD_Exporter_generateXml __cb, Ice.Current __current) throws ServerError
Generate XML and return the length- Specified by:
generateXml_async
in interface_ExporterOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
generateTiff_async
public void generateTiff_async(AMD_Exporter_generateTiff __cb, Ice.Current __current) throws ServerError
Description copied from interface:_ExporterOperations
Generates an OME-TIFF file. The return value is the length of the file produced. This method ends configuration.- Specified by:
generateTiff_async
in interface_ExporterOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
read_async
public void read_async(AMD_Exporter_read __cb, long pos, int size, Ice.Current __current) throws ServerError
Description copied from interface:_ExporterOperations
Returnslength
bytes from the output file. The file can be safely read until reset() is called.- Specified by:
read_async
in interface_ExporterOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
convertXml
public loci.formats.meta.IMetadata convertXml(loci.formats.meta.MetadataRetrieve retrieve) throws loci.common.services.ServiceException
- Throws:
loci.common.services.ServiceException
-
generateXml
public java.lang.String generateXml(loci.formats.meta.MetadataRetrieve retrieve) throws loci.common.services.ServiceException
- Throws:
loci.common.services.ServiceException
-
preClose
protected void preClose(Ice.Current current)
- Specified by:
preClose
in classAbstractCloseableAmdServant
-
postClose
protected void postClose(Ice.Current current)
Description copied from class:AbstractCloseableAmdServant
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.- Specified by:
postClose
in classAbstractCloseableAmdServant
-
-