Package ome.system
Class ServiceFactory
- java.lang.Object
-
- ome.system.ServiceFactory
-
public class ServiceFactory extends java.lang.ObjectEntry point for all client calls. Provides methods to obtain proxies for all remote facades.- Since:
- 3.0
- See Also:
OmeroContext
-
-
Field Summary
Fields Modifier and Type Field Description protected OmeroContextctxthecontext instancewhich thisServiceFactoryuses to look up all of its state.
-
Constructor Summary
Constructors Constructor Description ServiceFactory()default constructor which obtains the global staticclient contextfromOmeroContext.ServiceFactory(java.lang.String contextName)constructor which finds the global staticOmeroContextwith the given name.ServiceFactory(java.util.Properties properties)constructor which obtains a newclient context, passing in the provided properties for configuration.ServiceFactory(Login login)constructor which obtains a new (non-static)client context, passing in thePropertiesrepresentation of theLoginfor configuration.ServiceFactory(OmeroContext context)constructor which uses the providedOmeroContextfor all loookups.ServiceFactory(Server server)constructor which obtains a new (non-static)client context, passing in thePropertiesrepresentation of theServerfor configuration.ServiceFactory(Server server, Login login)constructor which obtains a new (non-static)client context, passing in thePropertiesrepresentation of both theServerand theLoginfor configuration.
-
Method Summary
-
-
-
Field Detail
-
ctx
protected OmeroContext ctx
thecontext instancewhich thisServiceFactoryuses to look up all of its state.
-
-
Constructor Detail
-
ServiceFactory
public ServiceFactory()
default constructor which obtains the global staticclient contextfromOmeroContext. This can be done manually by callingOmeroContext.getClientContext()
-
ServiceFactory
public ServiceFactory(Login login)
constructor which obtains a new (non-static)client context, passing in thePropertiesrepresentation of theLoginfor configuration.- See Also:
Login.asProperties(),ServiceFactory(Properties)
-
ServiceFactory
public ServiceFactory(Server server)
constructor which obtains a new (non-static)client context, passing in thePropertiesrepresentation of theServerfor configuration.- See Also:
Server.asProperties(),ServiceFactory(Properties)
-
ServiceFactory
public ServiceFactory(Server server, Login login)
constructor which obtains a new (non-static)client context, passing in thePropertiesrepresentation of both theServerand theLoginfor configuration.- See Also:
Login.asProperties(),ServiceFactory(Properties)
-
ServiceFactory
public ServiceFactory(java.util.Properties properties)
constructor which obtains a newclient context, passing in the provided properties for configuration.
-
ServiceFactory
public ServiceFactory(OmeroContext context)
constructor which uses the providedOmeroContextfor all loookups.
-
ServiceFactory
public ServiceFactory(java.lang.String contextName)
constructor which finds the global staticOmeroContextwith the given name.
-
-
Method Detail
-
getAdminService
public IAdmin getAdminService()
-
getAnalysisService
public IAnalysis getAnalysisService()
-
getConfigService
public IConfig getConfigService()
-
getContainerService
public IContainer getContainerService()
-
getDeleteService
public IDelete getDeleteService()
-
getLdapService
public ILdap getLdapService()
-
getPixelsService
public IPixels getPixelsService()
-
getProjectionService
public IProjection getProjectionService()
-
getQueryService
public IQuery getQueryService()
-
getShareService
public IShare getShareService()
-
getTypesService
public ITypes getTypesService()
-
getUpdateService
public IUpdate getUpdateService()
-
getRenderingSettingsService
public IRenderingSettings getRenderingSettingsService()
-
getRepositoryInfoService
public IRepositoryInfo getRepositoryInfoService()
-
getMetadataService
public IMetadata getMetadataService()
-
createJobHandle
public JobHandle createJobHandle()
create a newJobHandleproxy. This proxy will have to be initialized usingJobHandle.attach(long)orJobHandle.submit(ome.model.jobs.Job).
-
createRawPixelsStore
public RawPixelsStore createRawPixelsStore()
create a newRawPixelsStoreproxy. This proxy will have to be initialized usingRawPixelsStore.setPixelsId(long, boolean)
-
createRawFileStore
public RawFileStore createRawFileStore()
create a newRawFileStoreproxy. This proxy will have to be initialized usingRawFileStore.setFileId(long)
-
createRenderingEngine
public RenderingEngine createRenderingEngine()
create a newRenderingEngineproxy. This proxy will have to be initialized usingRenderingEngine.lookupPixels(long)andRenderingEngine.load()
-
createThumbnailService
public ThumbnailStore createThumbnailService()
create a newThumbnailStoreproxy. This proxy will have to be initialized usingThumbnailStore.setPixelsId(long)
-
getSessionService
public ISession getSessionService()
-
getSession
public ome.model.meta.Session getSession() throws ome.conditions.ApiUsageException- Throws:
ome.conditions.ApiUsageException
-
setSession
public void setSession(ome.model.meta.Session session) throws ome.conditions.ApiUsageException- Throws:
ome.conditions.ApiUsageException
-
closeSession
public void closeSession() throws ome.conditions.ApiUsageException- Throws:
ome.conditions.ApiUsageException
-
getSessionInitializer
protected SessionInitializer getSessionInitializer()
-
getServiceByClass
public <T extends ServiceInterface> T getServiceByClass(java.lang.Class<T> klass)
looks up services based on the currentprefixand the class name of the service type.
-
getPrefix
protected java.lang.String getPrefix()
used bygetServiceByClass(Class)to find the correct service proxy in thectx- Returns:
- a
String, usually "internal-" or "managed-"
-
getDefaultContext
protected java.lang.String getDefaultContext()
used when nocontextname is provided to the constructor. Subclasses can override to allow for easier creation.- Returns:
- name of default context as found in beanRefContext.xml.
-
-