public final class SessionManagerI extends Glacier2._SessionManagerDisp implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<InternalMessage>
Session
via the SessionManager
in order to
get through the firewall. The Session
(here a
ServiceFactoryI
instance) also manages all servants created by the
client.Modifier and Type | Field and Description |
---|---|
protected Ice.ObjectAdapter |
adapter |
protected OmeroContext |
context |
protected Executor |
executor |
protected AtomicBoolean |
loaded |
protected Registry |
registry |
protected Ring |
ring |
protected SecuritySystem |
securitySystem |
protected int |
servantsPerSession |
protected SessionManager |
sessionManager |
protected com.google.common.cache.Cache<String,ServantHolder> |
sessionToHolder
An internal mapping to all
ServiceFactoryI instances for a given
session since there is no method on ObjectAdapter to retrieve
all servants. |
protected TopicManager |
topicManager |
Constructor and Description |
---|
SessionManagerI(Ring ring,
Ice.ObjectAdapter adapter,
SecuritySystem secSys,
SessionManager sessionManager,
Executor executor,
TopicManager topicManager,
Registry reg,
int servantsPerSession) |
Modifier and Type | Method and Description |
---|---|
Glacier2.SessionPrx |
create(String userId,
Glacier2.SessionControlPrx control,
Ice.Current current)
Create a new session.
|
protected String |
getAgent(Ice.Current current) |
protected String |
getEvent(Ice.Current current) |
protected String |
getGroup(Ice.Current current) |
protected String |
getIP(Ice.Current current) |
protected ServiceFactoryI |
getServiceFactory(Ice.Identity iid) |
protected ServiceFactoryI |
getServiceFactory(String clientId,
String sessionId) |
protected Ice.Identity |
getServiceFactoryIdentity(Ice.Current curr) |
void |
onApplicationEvent(InternalMessage event)
Handle an application event.
|
void |
reapSession(String sessionId)
Destroys all the
ServiceFactoryI instances based on the given sessionId. |
void |
requestHeartBeats()
Destroys all the
ServiceFactoryI instances based on the given sessionId. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Set the ApplicationContext that this object runs in.
|
___create, __dispatch, __readImpl, __writeImpl, create, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __collocDispatch, __read, __read, __readImpl, __write, __write, __writeImpl, clone, ice_dispatch, ice_dispatch, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
protected OmeroContext context
protected final Ice.ObjectAdapter adapter
protected final SecuritySystem securitySystem
protected final SessionManager sessionManager
protected final Executor executor
protected final Ring ring
protected final Registry registry
protected final TopicManager topicManager
protected final AtomicBoolean loaded
protected final int servantsPerSession
protected final com.google.common.cache.Cache<String,ServantHolder> sessionToHolder
ServiceFactoryI
instances for a given
session since there is no method on ObjectAdapter
to retrieve
all servants.public SessionManagerI(Ring ring, Ice.ObjectAdapter adapter, SecuritySystem secSys, SessionManager sessionManager, Executor executor, TopicManager topicManager, Registry reg, int servantsPerSession)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
org.springframework.context.ApplicationContextAware
Invoked after population of normal bean properties but before an init callback such
as InitializingBean.afterPropertiesSet()
or a custom init-method. Invoked after ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
,
ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
and
MessageSourceAware
, if applicable.
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
applicationContext
- the ApplicationContext object to be used by this objectorg.springframework.context.ApplicationContextException
- in case of context initialization errorsorg.springframework.beans.BeansException
- if thrown by application context methodsBeanInitializationException
public Glacier2.SessionPrx create(String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException
Glacier2._SessionManagerOperations
create
in interface Glacier2._SessionManagerOperations
userId
- The user id for the session.control
- A proxy to the session control object.current
- The Current object for the invocation.Glacier2.CannotCreateSessionException
- Raised if the session
cannot be created.public void onApplicationEvent(InternalMessage event)
org.springframework.context.ApplicationListener
onApplicationEvent
in interface org.springframework.context.ApplicationListener<InternalMessage>
event
- the event to respond topublic void requestHeartBeats()
Destroys
all the
ServiceFactoryI
instances based on the given sessionId. Multiple
clients can be attached to the same session, each with its own
ServiceFactoryI
public void reapSession(String sessionId)
Destroys
all the
ServiceFactoryI
instances based on the given sessionId. Multiple
clients can be attached to the same session, each with its own
ServiceFactoryI
protected ServiceFactoryI getServiceFactory(String clientId, String sessionId)
protected ServiceFactoryI getServiceFactory(Ice.Identity iid)
protected Ice.Identity getServiceFactoryIdentity(Ice.Current curr)
protected String getGroup(Ice.Current current)
protected String getAgent(Ice.Current current)
protected String getIP(Ice.Current current)
protected String getEvent(Ice.Current current)
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.