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 voidaddImage_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.IMetadataconvertXml(loci.formats.meta.MetadataRetrieve retrieve)voidgenerateTiff_async(AMD_Exporter_generateTiff __cb, Ice.Current __current)Generates an OME-TIFF file.java.lang.StringgenerateXml(loci.formats.meta.MetadataRetrieve retrieve)voidgenerateXml_async(AMD_Exporter_generateXml __cb, Ice.Current __current)Generate XML and return the lengthprotected voidpostClose(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 voidpreClose(Ice.Current current)voidread_async(AMD_Exporter_read __cb, long pos, int size, Ice.Current __current)Returnslengthbytes from the output file.voidsetServiceFactory(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:
setServiceFactoryin interfaceServiceFactoryAware- Throws:
ServerError
-
addImage_async
public void addImage_async(AMD_Exporter_addImage __cb, long id, Ice.Current __current) throws ServerError
Description copied from interface:_ExporterOperationsAdds a single image with basic metadata to the Exporter for inclusion on the next call to getBytes().- Specified by:
addImage_asyncin 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_asyncin 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:_ExporterOperationsGenerates an OME-TIFF file. The return value is the length of the file produced. This method ends configuration.- Specified by:
generateTiff_asyncin 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:_ExporterOperationsReturnslengthbytes from the output file. The file can be safely read until reset() is called.- Specified by:
read_asyncin 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:
preClosein classAbstractCloseableAmdServant
-
postClose
protected void postClose(Ice.Current current)
Description copied from class:AbstractCloseableAmdServantShould 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:
postClosein classAbstractCloseableAmdServant
-
-