|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectIce.ObjectImpl
omero.api._ServiceFactoryDisp
ome.services.blitz.impl.ServiceFactoryI
public final class ServiceFactoryI
Responsible for maintaining all servants for a single session.
In general, try to reduce access to the Current
and
Util
objects.
Field Summary | |
---|---|
String |
clientId
|
Glacier2.SessionControlPrx |
control
|
Fields inherited from class omero.api._ServiceFactoryDisp |
---|
__ids |
Constructor Summary | |
---|---|
ServiceFactoryI(boolean reusedSession,
Ice.Current current,
Glacier2.SessionControlPrx control,
OmeroContext context,
SessionManager manager,
Executor executor,
Principal p,
List<HardWiredInterceptor> interceptors,
TopicManager topicManager,
Registry registry)
|
|
ServiceFactoryI(Ice.Current current,
Glacier2.SessionControlPrx control,
OmeroContext context,
SessionManager manager,
Executor executor,
Principal p,
List<HardWiredInterceptor> interceptors,
TopicManager topicManager,
Registry registry)
|
Method Summary | |
---|---|
List<String> |
activeServices(Ice.Current __current)
|
void |
allow(Ice.ObjectPrx prx)
|
static String |
clientId(Ice.Current current)
Helpers method to extract the CLIENTUUID out of the given
Ice.Current. |
void |
close(Ice.Current current)
Deprecated. |
void |
closeOnDestroy(Ice.Current current)
|
omero.api.StatefulServiceInterfacePrx |
createByName(String name,
Ice.Current current)
|
omero.api.ExporterPrx |
createExporter(Ice.Current current)
|
omero.api.GatewayPrx |
createGateway(Ice.Current current)
|
omero.api.JobHandlePrx |
createJobHandle(Ice.Current current)
|
omero.api.RawFileStorePrx |
createRawFileStore(Ice.Current current)
|
omero.api.RawPixelsStorePrx |
createRawPixelsStore(Ice.Current current)
|
omero.api.RenderingEnginePrx |
createRenderingEngine(Ice.Current current)
|
omero.api.SearchPrx |
createSearchService(Ice.Current current)
|
protected Ice.Object |
createServantDelegate(String name)
Creates a proxy according to the ServantDefinition for the given
name. |
omero.api.ThumbnailStorePrx |
createThumbnailStore(Ice.Current current)
|
void |
destroy(Ice.Current current)
Destruction simply decrements the reference count for a session to allow reconnecting to it. |
void |
detachOnDestroy(Ice.Current current)
|
void |
doDestroy()
Performs the actual cleanup operation on all the resources shared between this and other ServiceFactoryI instances in the same
Session . |
Ice.ObjectAdapter |
getAdapter()
|
omero.api.IAdminPrx |
getAdminService(Ice.Current current)
|
omero.api.ServiceInterfacePrx |
getByName(String blankname,
Ice.Current dontUse)
|
omero.api.IConfigPrx |
getConfigService(Ice.Current current)
|
omero.api.IContainerPrx |
getContainerService(Ice.Current current)
|
omero.api.IDeletePrx |
getDeleteService(Ice.Current current)
|
EventContext |
getEventContext()
|
Executor |
getExecutor()
|
Ice.Identity |
getIdentity(String idName)
Constructs an Identity from the name of this
ServiceFactoryI and from the given String which for
stateless services are defined by the instance fields #adminKey ,
#configKey , etc. and for stateful services are UUIDs. |
omero.api.ILdapPrx |
getLdapService(Ice.Current current)
|
omero.api.IMetadataPrx |
getMetadataService(Ice.Current current)
|
omero.api.IPixelsPrx |
getPixelsService(Ice.Current current)
|
Principal |
getPrincipal()
|
omero.api.IProjectionPrx |
getProjectionService(Ice.Current current)
|
omero.api.IQueryPrx |
getQueryService(Ice.Current current)
|
omero.api.IRenderingSettingsPrx |
getRenderingSettingsService(Ice.Current current)
|
omero.api.IRepositoryInfoPrx |
getRepositoryInfoService(Ice.Current current)
|
omero.api.IRoiPrx |
getRoiService(Ice.Current current)
|
omero.api.IScriptPrx |
getScriptService(Ice.Current current)
|
List<omero.model.IObject> |
getSecurityContexts(Ice.Current __current)
|
Object |
getServant(Ice.Identity id)
|
omero.api.ISessionPrx |
getSessionService(Ice.Current current)
|
omero.api.ISharePrx |
getShareService(Ice.Current current)
|
String |
getStatefulServiceCount()
NB: Much of the logic here is similar to doClose and should
be pushed down. |
Ice.TieBase |
getTie(Ice.Identity id)
|
omero.api.ITimelinePrx |
getTimelineService(Ice.Current current)
|
omero.api.ITypesPrx |
getTypesService(Ice.Current current)
|
omero.api.IUpdatePrx |
getUpdateService(Ice.Current current)
|
protected omero.ServerError |
handleException(Throwable t)
|
boolean |
keepAlive(omero.api.ServiceInterfacePrx proxy,
Ice.Current __current)
Currently ignoring the individual proxies |
long |
keepAllAlive(omero.api.ServiceInterfacePrx[] proxies,
Ice.Current __current)
|
omero.api.ServiceFactoryPrx |
proxy()
|
Ice.ObjectPrx |
registerServant(Ice.Identity id,
Ice.Object servant)
Registers the servant with the adapter (or throws an exception if one is already registered) as well as configures the servant in any post-Spring way necessary, based on the type of the servant. |
Ice.Identity |
sessionId()
Returns the Identity for this instance as defined by
sessionId(String, String) |
static Ice.Identity |
sessionId(String clientId,
String uuid)
Definition of session ids: "session- |
void |
setCallback(omero.api.ClientCallbackPrx callback,
Ice.Current current)
|
omero.model.IObject |
setSecurityContext(omero.model.IObject obj,
Ice.Current __current)
|
void |
setSecurityPassword(String password,
Ice.Current __current)
|
omero.grid.SharedResourcesPrx |
sharedResources(Ice.Current current)
|
void |
subscribe(String topicName,
Ice.ObjectPrx prx,
Ice.Current __current)
|
String |
toString()
|
void |
unregisterServant(Ice.Identity id)
Reverts all the additions made by #registerServant(ServantInterface, Ice.Current, Ice.Identity)
Now called by SessionManagerI in response
to an UnregisterServantMessage |
Methods inherited from class omero.api._ServiceFactoryDisp |
---|
___activeServices, ___close, ___closeOnDestroy, ___createByName, ___createExporter, ___createGateway, ___createJobHandle, ___createRawFileStore, ___createRawPixelsStore, ___createRenderingEngine, ___createSearchService, ___createThumbnailStore, ___detachOnDestroy, ___getAdminService, ___getByName, ___getConfigService, ___getContainerService, ___getDeleteService, ___getLdapService, ___getMetadataService, ___getPixelsService, ___getProjectionService, ___getQueryService, ___getRenderingSettingsService, ___getRepositoryInfoService, ___getRoiService, ___getScriptService, ___getSecurityContexts, ___getSessionService, ___getShareService, ___getTimelineService, ___getTypesService, ___getUpdateService, ___keepAlive, ___keepAllAlive, ___setCallback, ___setSecurityContext, ___setSecurityPassword, ___sharedResources, ___subscribe, __dispatch, __read, __read, __write, __write, activeServices, close, closeOnDestroy, createByName, createExporter, createGateway, createJobHandle, createRawFileStore, createRawPixelsStore, createRenderingEngine, createSearchService, createThumbnailStore, destroy, detachOnDestroy, getAdminService, getByName, getConfigService, getContainerService, getDeleteService, getLdapService, getMetadataService, getPixelsService, getProjectionService, getQueryService, getRenderingSettingsService, getRepositoryInfoService, getRoiService, getScriptService, getSecurityContexts, getSessionService, getShareService, getTimelineService, getTypesService, getUpdateService, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId, keepAlive, keepAllAlive, setCallback, setSecurityContext, setSecurityPassword, sharedResources, subscribe |
Methods inherited from class Ice.ObjectImpl |
---|
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __collocDispatch, clone, ice_dispatch, ice_hash, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Ice.Object |
---|
__collocDispatch, clone, equals, ice_dispatch, ice_hash, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal |
Field Detail |
---|
public final String clientId
public final Glacier2.SessionControlPrx control
Constructor Detail |
---|
public ServiceFactoryI(Ice.Current current, Glacier2.SessionControlPrx control, OmeroContext context, SessionManager manager, Executor executor, Principal p, List<HardWiredInterceptor> interceptors, TopicManager topicManager, Registry registry) throws omero.ApiUsageException
omero.ApiUsageException
public ServiceFactoryI(boolean reusedSession, Ice.Current current, Glacier2.SessionControlPrx control, OmeroContext context, SessionManager manager, Executor executor, Principal p, List<HardWiredInterceptor> interceptors, TopicManager topicManager, Registry registry) throws omero.ApiUsageException
omero.ApiUsageException
Method Detail |
---|
public Ice.ObjectAdapter getAdapter()
public Principal getPrincipal()
public Executor getExecutor()
public omero.api.ServiceFactoryPrx proxy()
public List<omero.model.IObject> getSecurityContexts(Ice.Current __current) throws omero.ServerError
omero.ServerError
public omero.model.IObject setSecurityContext(omero.model.IObject obj, Ice.Current __current) throws omero.ServerError
omero.ServerError
public void setSecurityPassword(String password, Ice.Current __current) throws omero.ServerError
omero.ServerError
protected omero.ServerError handleException(Throwable t)
public omero.api.IAdminPrx getAdminService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IConfigPrx getConfigService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IDeletePrx getDeleteService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ILdapPrx getLdapService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IPixelsPrx getPixelsService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IContainerPrx getContainerService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IProjectionPrx getProjectionService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IQueryPrx getQueryService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IRoiPrx getRoiService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IScriptPrx getScriptService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ISessionPrx getSessionService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ISharePrx getShareService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ITimelinePrx getTimelineService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ITypesPrx getTypesService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IUpdatePrx getUpdateService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IRenderingSettingsPrx getRenderingSettingsService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IRepositoryInfoPrx getRepositoryInfoService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.IMetadataPrx getMetadataService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ExporterPrx createExporter(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.GatewayPrx createGateway(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.JobHandlePrx createJobHandle(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.RenderingEnginePrx createRenderingEngine(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.RawFileStorePrx createRawFileStore(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.RawPixelsStorePrx createRawPixelsStore(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.SearchPrx createSearchService(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.api.ThumbnailStorePrx createThumbnailStore(Ice.Current current) throws omero.ServerError
omero.ServerError
public omero.grid.SharedResourcesPrx sharedResources(Ice.Current current) throws omero.ServerError
omero.ServerError
public Ice.TieBase getTie(Ice.Identity id)
public Object getServant(Ice.Identity id)
public omero.api.ServiceInterfacePrx getByName(String blankname, Ice.Current dontUse) throws omero.ServerError
omero.ServerError
public omero.api.StatefulServiceInterfacePrx createByName(String name, Ice.Current current) throws omero.ServerError
omero.ServerError
public void subscribe(String topicName, Ice.ObjectPrx prx, Ice.Current __current) throws omero.ServerError
omero.ServerError
public void setCallback(omero.api.ClientCallbackPrx callback, Ice.Current current) throws omero.ServerError
omero.ServerError
public void detachOnDestroy(Ice.Current current)
@Deprecated public void close(Ice.Current current)
public void closeOnDestroy(Ice.Current current)
public void destroy(Ice.Current current)
public String getStatefulServiceCount()
doClose
and should
be pushed down.
public void doDestroy()
ServiceFactoryI
instances in the same
Session
. Since _ServiceFactoryDisp.destroy()
is called regardless by the
router, even when a client has just died, we have this internal method
for handling the actual closing of resources.
This method must take precautions to not throw a SessionException
. See destroy(Current)
for more information.
public List<String> activeServices(Ice.Current __current)
public EventContext getEventContext()
public long keepAllAlive(omero.api.ServiceInterfacePrx[] proxies, Ice.Current __current) throws omero.ServerError
omero.ServerError
public boolean keepAlive(omero.api.ServiceInterfacePrx proxy, Ice.Current __current) throws omero.ServerError
omero.ServerError
public void allow(Ice.ObjectPrx prx)
public Ice.Identity getIdentity(String idName)
Identity
from the name of this
ServiceFactoryI
and from the given String
which for
stateless services are defined by the instance fields #adminKey
,
#configKey
, etc. and for stateful services are UUIDs.
protected Ice.Object createServantDelegate(String name) throws omero.ServerError
ServantDefinition
for the given
name. Injects the #helper
instance for this session so that all
services are linked to a single session.
Creates an ome.api.* service (mostly managed by Spring), wraps it with
the interceptors
which are in effect, and
stores the instance away in the cache.
Note: Since HardWiredInterceptor
implements
MethodInterceptor
, all the Advice
instances will be
wrapped in Advisor
instances and will be returned by
Advised.getAdvisors()
.
omero.ServerError
public Ice.ObjectPrx registerServant(Ice.Identity id, Ice.Object servant) throws omero.ServerError
omero.ServerError
public void unregisterServant(Ice.Identity id)
#registerServant(ServantInterface, Ice.Current, Ice.Identity)
Now called by SessionManagerI
in response
to an UnregisterServantMessage
public static Ice.Identity sessionId(String clientId, String uuid)
public Ice.Identity sessionId()
Identity
for this instance as defined by
sessionId(String, String)
public static String clientId(Ice.Current current) throws omero.ApiUsageException
CLIENTUUID
out of the given
Ice.Current. Throws an ApiUsageException
if none is present,
since it is each client's responsibility to set this value.
(Typically done in our SDKs)
omero.ApiUsageException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.