Package ome.services.blitz.impl
Class RawFileStoreI
- java.lang.Object
- 
- ome.services.blitz.impl.AbstractAmdServant
- 
- ome.services.blitz.impl.AbstractCloseableAmdServant
- 
- ome.services.blitz.impl.RawFileStoreI
 
 
 
- 
- All Implemented Interfaces:
- ServiceFactoryAware,- _RawFileStoreOperations,- _ServiceInterfaceOperations,- _StatefulServiceInterfaceOperations,- CloseableServant,- TieAware,- org.springframework.beans.factory.Aware,- org.springframework.context.ApplicationContextAware
 - Direct Known Subclasses:
- RepoRawFileStoreI
 
 public class RawFileStoreI extends AbstractCloseableAmdServant implements _RawFileStoreOperations, ServiceFactoryAware, TieAware Implementation of the RawFileStore service.- Since:
- 3.0-Beta4
- See Also:
- RawFileStore
 
- 
- 
Constructor SummaryConstructors Constructor Description RawFileStoreI(ome.api.RawFileStore service, BlitzExecutor be)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean__redirect(long fileId, _RawFileStoreTie rfsTie, Ice.Current current)voidexists_async(AMD_RawFileStore_exists __cb, Ice.Current __current)Checks to see if a raw file exists with the file ID that the service was initialized with.voidgetFileId_async(AMD_RawFileStore_getFileId __cb, Ice.Current __current)Returns the current file id or null if none has been set.ServiceFactoryIgetServiceFactory()protected 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_RawFileStore_read __cb, long position, int length, Ice.Current __current)Readslengthbytes of data at thepositionfrom the raw file into an array of bytes.voidsave_async(AMD_RawFileStore_save __cb, Ice.Current __current)Saves theOriginalFileassociated with the service if it has been modified.voidsetFileId_async(AMD_RawFileStore_setFileId __cb, long fileId, Ice.Current __current)This method manages the state of the service.voidsetServiceFactory(ServiceFactoryI sf)voidsetTie(Ice.TieBase tie)voidsize_async(AMD_RawFileStore_size __cb, Ice.Current __current)Returns the size of the file on disk (not as stored in the database since that value will only be updated onsave.voidtruncate_async(AMD_RawFileStore_truncate __cb, long length, Ice.Current __current)Limits the size of a file to the given length.voidwrite_async(AMD_RawFileStore_write __cb, byte[] buf, long position, int length, Ice.Current __current)Writeslengthbytes of data from the specifiedbufbyte array starting at atpositionto the raw file.- 
Methods inherited from class ome.services.blitz.impl.AbstractCloseableAmdServantclose, close_async
 - 
Methods inherited from class ome.services.blitz.impl.AbstractAmdServantactivate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface omero.api._StatefulServiceInterfaceOperationsactivate_async, close_async, getCurrentEventContext_async, passivate_async
 
- 
 
- 
- 
- 
Constructor Detail- 
RawFileStoreIpublic RawFileStoreI(ome.api.RawFileStore service, BlitzExecutor be)
 
- 
 - 
Method Detail- 
setServiceFactorypublic void setServiceFactory(ServiceFactoryI sf) throws ServerError - Specified by:
- setServiceFactoryin interface- ServiceFactoryAware
- Throws:
- ServerError
 
 - 
getServiceFactorypublic ServiceFactoryI getServiceFactory() throws ServerError - Throws:
- ServerError
 
 - 
setTiepublic void setTie(Ice.TieBase tie) throws ServerError- Specified by:
- setTiein interface- TieAware
- Throws:
- ServerError
 
 - 
exists_asyncpublic void exists_async(AMD_RawFileStore_exists __cb, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsChecks to see if a raw file exists with the file ID that the service was initialized with.- Specified by:
- exists_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
read_asyncpublic void read_async(AMD_RawFileStore_read __cb, long position, int length, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsReadslengthbytes of data at thepositionfrom the raw file into an array of bytes.- Specified by:
- read_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
getFileId_asyncpublic void getFileId_async(AMD_RawFileStore_getFileId __cb, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsReturns the current file id or null if none has been set.- Specified by:
- getFileId_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
setFileId_asyncpublic void setFileId_async(AMD_RawFileStore_setFileId __cb, long fileId, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsThis method manages the state of the service. This method will throw aSecurityViolationif for the current user context either the file is not readable or aomero.constants.permissions.BINARYACCESSrestriction is in place.- Specified by:
- setFileId_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
size_asyncpublic void size_async(AMD_RawFileStore_size __cb, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsReturns the size of the file on disk (not as stored in the database since that value will only be updated onsave. If the file has not yet been written to, and therefore does not exist, aResourceErrorwill be thrown.- Specified by:
- size_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
truncate_asyncpublic void truncate_async(AMD_RawFileStore_truncate __cb, long length, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsLimits the size of a file to the given length. If the file is already shorter than length, no action is taken in which case false is returned.- Specified by:
- truncate_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
write_asyncpublic void write_async(AMD_RawFileStore_write __cb, byte[] buf, long position, int length, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsWriteslengthbytes of data from the specifiedbufbyte array starting at atpositionto the raw file.- Specified by:
- write_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
save_asyncpublic void save_async(AMD_RawFileStore_save __cb, Ice.Current __current) throws ServerError Description copied from interface:_RawFileStoreOperationsSaves theOriginalFileassociated with the service if it has been modified. The returned valued should replace all instances of theOriginalFilein the client. If save has not been called,RawFileStoreinstances will save theOriginalFileobject associated with it onclose. See also ticket 1651 and ticket 2161.- Specified by:
- save_asyncin interface- _RawFileStoreOperations
- Parameters:
- __cb- The callback object for the operation.
- __current- The Current object for the invocation.
- Throws:
- ServerError
 
 - 
preCloseprotected void preClose(Ice.Current current) throws java.lang.Throwable- Specified by:
- preClosein class- AbstractCloseableAmdServant
- Throws:
- java.lang.Throwable
 
 - 
postCloseprotected 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 class- AbstractCloseableAmdServant
 
 - 
__redirectpublic boolean __redirect(long fileId, _RawFileStoreTie rfsTie, Ice.Current current) throws ServerError- Throws:
- ServerError
 
 
- 
 
-