Package ome.system
Class ServiceFactory
- java.lang.Object
-
- ome.system.ServiceFactory
-
public class ServiceFactory extends java.lang.Object
Entry 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 OmeroContext
ctx
thecontext instance
which thisServiceFactory
uses to look up all of its state.
-
Constructor Summary
Constructors Constructor Description ServiceFactory()
default constructor which obtains the global staticclient context
fromOmeroContext
.ServiceFactory(java.lang.String contextName)
constructor which finds the global staticOmeroContext
with 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 theProperties
representation of theLogin
for configuration.ServiceFactory(OmeroContext context)
constructor which uses the providedOmeroContext
for all loookups.ServiceFactory(Server server)
constructor which obtains a new (non-static)client context
, passing in theProperties
representation of theServer
for configuration.ServiceFactory(Server server, Login login)
constructor which obtains a new (non-static)client context
, passing in theProperties
representation of both theServer
and theLogin
for configuration.
-
Method Summary
-
-
-
Field Detail
-
ctx
protected OmeroContext ctx
thecontext instance
which thisServiceFactory
uses to look up all of its state.
-
-
Constructor Detail
-
ServiceFactory
public ServiceFactory()
default constructor which obtains the global staticclient context
fromOmeroContext
. This can be done manually by callingOmeroContext.getClientContext()
-
ServiceFactory
public ServiceFactory(Login login)
constructor which obtains a new (non-static)client context
, passing in theProperties
representation of theLogin
for configuration.- See Also:
Login.asProperties()
,ServiceFactory(Properties)
-
ServiceFactory
public ServiceFactory(Server server)
constructor which obtains a new (non-static)client context
, passing in theProperties
representation of theServer
for 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 theProperties
representation of both theServer
and theLogin
for 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 providedOmeroContext
for all loookups.
-
ServiceFactory
public ServiceFactory(java.lang.String contextName)
constructor which finds the global staticOmeroContext
with 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 newJobHandle
proxy. This proxy will have to be initialized usingJobHandle.attach(long)
orJobHandle.submit(ome.model.jobs.Job)
.
-
createRawPixelsStore
public RawPixelsStore createRawPixelsStore()
create a newRawPixelsStore
proxy. This proxy will have to be initialized usingRawPixelsStore.setPixelsId(long, boolean)
-
createRawFileStore
public RawFileStore createRawFileStore()
create a newRawFileStore
proxy. This proxy will have to be initialized usingRawFileStore.setFileId(long)
-
createRenderingEngine
public RenderingEngine createRenderingEngine()
create a newRenderingEngine
proxy. This proxy will have to be initialized usingRenderingEngine.lookupPixels(long)
andRenderingEngine.load()
-
createThumbnailService
public ThumbnailStore createThumbnailService()
create a newThumbnailStore
proxy. 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 currentprefix
and 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 nocontext
name is provided to the constructor. Subclasses can override to allow for easier creation.- Returns:
- name of default context as found in beanRefContext.xml.
-
-