ome.tools.spring
Class ManagedServiceFactory

java.lang.Object
  extended by ome.system.ServiceFactory
      extended by ome.tools.spring.ManagedServiceFactory
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public class ManagedServiceFactory
extends ServiceFactory
implements org.springframework.context.ApplicationContextAware

subclass of ome.system.ServiceFactory which retrieves managed service-instances. These have all the necessary layers of AOP interceptors for proper functioning. In fact, the returned services behave almost exactly as if they were in an application server ("container").

Since:
1.0
Version:
1.0 (Internal version: $Rev: 2640 $ $Date: 2008-07-30 21:58:39 +0100 (Wed, 30 Jul 2008) $)
Author:
Josh Moore      josh.moore@gmx.de

Field Summary
 
Fields inherited from class ome.system.ServiceFactory
ctx
 
Constructor Summary
ManagedServiceFactory()
           
 
Method Summary
protected  String getDefaultContext()
          returns null to prevent the lookup of any context, but rather wait on injection as a ApplicationContextAware
protected  String getPrefix()
          used by ServiceFactory.getServiceByClass(Class) to find the correct service proxy in the ServiceFactory.ctx
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          simple injector for the ApplicationContext
 
Methods inherited from class ome.system.ServiceFactory
closeSession, createJobHandle, createRawFileStore, createRawPixelsStore, createRenderingEngine, createSearchService, createThumbnailService, getAdminService, getAnalysisService, getConfigService, getContainerService, getContext, getDeleteService, getLdapService, getMetadataService, getPixelsService, getProjectionService, getQueryService, getRenderingSettingsService, getRepositoryInfoService, getServiceByClass, getSession, getSessionInitializer, getSessionService, getShareService, getTypesService, getUpdateService, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedServiceFactory

public ManagedServiceFactory()
Method Detail

getPrefix

protected String getPrefix()
Description copied from class: ServiceFactory
used by ServiceFactory.getServiceByClass(Class) to find the correct service proxy in the ServiceFactory.ctx

Overrides:
getPrefix in class ServiceFactory
Returns:
a String, usually "internal-" or "managed-"

getDefaultContext

protected String getDefaultContext()
returns null to prevent the lookup of any context, but rather wait on injection as a ApplicationContextAware

Overrides:
getDefaultContext in class ServiceFactory
Returns:
name of default context as found in beanRefContext.xml.

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
simple injector for the ApplicationContext

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.