Package ome.services.blitz.fire
Class SessionManagerI
- java.lang.Object
-
- Ice.ObjectImpl
-
- Glacier2._SessionManagerDisp
-
- ome.services.blitz.fire.SessionManagerI
-
- All Implemented Interfaces:
Glacier2._SessionManagerOperations,Glacier2._SessionManagerOperationsNC,Glacier2.SessionManager,Ice.Object,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<ome.util.messages.InternalMessage>
public final class SessionManagerI extends Glacier2._SessionManagerDisp implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<ome.util.messages.InternalMessage>Central login logic for all OMERO.blitz clients. It is required to create aSessionvia theSessionManagerin order to get through the firewall. TheSession(here aServiceFactoryIinstance) also manages all servants created by the client.- Since:
- 3.0-Beta2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Ice.ObjectAdapteradapterprotected ome.system.OmeroContextcontextprotected ome.services.util.Executorexecutorprotected java.util.concurrent.atomic.AtomicBooleanloadedprotected Registryregistryprotected Ringringprotected ome.security.SecuritySystemsecuritySystemprotected intservantsPerSessionprotected ome.services.sessions.SessionManagersessionManagerprotected com.google.common.cache.Cache<java.lang.String,ServantHolder>sessionToHolderAn internal mapping to allServiceFactoryIinstances for a given session since there is no method onObjectAdapterto retrieve all servants.protected TopicManagertopicManager
-
Constructor Summary
Constructors Constructor Description SessionManagerI(Ring ring, Ice.ObjectAdapter adapter, ome.security.SecuritySystem secSys, ome.services.sessions.SessionManager sessionManager, ome.services.util.Executor executor, TopicManager topicManager, Registry reg, int servantsPerSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Glacier2.SessionPrxcreate(java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current)protected java.lang.StringgetAgent(Ice.Current current)protected java.lang.StringgetEvent(Ice.Current current)protected java.lang.StringgetGroup(Ice.Current current)protected java.lang.StringgetIP(Ice.Current current)protected ServiceFactoryIgetServiceFactory(Ice.Identity iid)protected ServiceFactoryIgetServiceFactory(java.lang.String clientId, java.lang.String sessionId)protected Ice.IdentitygetServiceFactoryIdentity(Ice.Current curr)voidonApplicationEvent(ome.util.messages.InternalMessage event)voidreapSession(java.lang.String sessionId)Destroysall theServiceFactoryIinstances based on the given sessionId.voidrequestHeartBeats()Destroysall theServiceFactoryIinstances based on the given sessionId.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)-
Methods inherited from class Glacier2._SessionManagerDisp
___create, __dispatch, __readImpl, __writeImpl, create, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId
-
Methods inherited from class Ice.ObjectImpl
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __read, __read, __readImpl, __write, __write, __writeImpl, clone, ice_dispatch, ice_dispatch, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
-
-
-
-
Field Detail
-
context
protected ome.system.OmeroContext context
-
adapter
protected final Ice.ObjectAdapter adapter
-
securitySystem
protected final ome.security.SecuritySystem securitySystem
-
sessionManager
protected final ome.services.sessions.SessionManager sessionManager
-
executor
protected final ome.services.util.Executor executor
-
ring
protected final Ring ring
-
registry
protected final Registry registry
-
topicManager
protected final TopicManager topicManager
-
loaded
protected final java.util.concurrent.atomic.AtomicBoolean loaded
-
servantsPerSession
protected final int servantsPerSession
-
sessionToHolder
protected final com.google.common.cache.Cache<java.lang.String,ServantHolder> sessionToHolder
An internal mapping to allServiceFactoryIinstances for a given session since there is no method onObjectAdapterto retrieve all servants.
-
-
Constructor Detail
-
SessionManagerI
public SessionManagerI(Ring ring, Ice.ObjectAdapter adapter, ome.security.SecuritySystem secSys, ome.services.sessions.SessionManager sessionManager, ome.services.util.Executor executor, TopicManager topicManager, Registry reg, int servantsPerSession)
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
create
public Glacier2.SessionPrx create(java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException- Specified by:
createin interfaceGlacier2._SessionManagerOperations- Throws:
Glacier2.CannotCreateSessionException
-
onApplicationEvent
public void onApplicationEvent(ome.util.messages.InternalMessage event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<ome.util.messages.InternalMessage>
-
requestHeartBeats
public void requestHeartBeats()
Destroysall theServiceFactoryIinstances based on the given sessionId. Multiple clients can be attached to the same session, each with its ownServiceFactoryI
-
reapSession
public void reapSession(java.lang.String sessionId)
Destroysall theServiceFactoryIinstances based on the given sessionId. Multiple clients can be attached to the same session, each with its ownServiceFactoryI
-
getServiceFactory
protected ServiceFactoryI getServiceFactory(java.lang.String clientId, java.lang.String sessionId)
-
getServiceFactory
protected ServiceFactoryI getServiceFactory(Ice.Identity iid)
-
getServiceFactoryIdentity
protected Ice.Identity getServiceFactoryIdentity(Ice.Current curr)
-
getGroup
protected java.lang.String getGroup(Ice.Current current)
-
getAgent
protected java.lang.String getAgent(Ice.Current current)
-
getIP
protected java.lang.String getIP(Ice.Current current)
-
getEvent
protected java.lang.String getEvent(Ice.Current current)
-
-