public class EventHandler extends Object implements MethodInterceptor, org.springframework.context.ApplicationListener<ContextMessage>
BasicSecuritySystem provided in the
constructor.
After the method is invoked various cleanup actions are performed and finally all credentials
all cleared from the
Thread.| Modifier and Type | Field and Description |
|---|---|
protected SessionFactory |
factory |
protected boolean |
readOnly |
protected BasicSecuritySystem |
secSys |
protected ome.util.SqlAction |
sql |
protected org.springframework.transaction.interceptor.TransactionAttributeSource |
txSource |
| Constructor and Description |
|---|
EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource)
only public constructor, used for dependency injection.
|
EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource,
boolean readOnly) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doLogin(boolean readOnly,
boolean isClose) |
Object |
invoke(MethodInvocation arg0)
invocation interceptor for prepairing this
Thread for execution
and subsequently reseting it. |
void |
onApplicationEvent(ContextMessage msg)
If a
ContextMessage is received, then we either need to add a
ContextMessage.Push login to the stack or
ContextMessage.Pop remove one. |
protected final org.springframework.transaction.interceptor.TransactionAttributeSource txSource
protected final BasicSecuritySystem secSys
protected final SessionFactory factory
protected final ome.util.SqlAction sql
protected final boolean readOnly
public EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource)
HibernateTemplate and BasicSecuritySystem.securitySystem - Not null.template - Not null.public EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource,
boolean readOnly)
public void onApplicationEvent(ContextMessage msg)
ContextMessage is received, then we either need to add a
ContextMessage.Push login to the stack or
ContextMessage.Pop remove one.onApplicationEvent in interface org.springframework.context.ApplicationListener<ContextMessage>msg - the event to respond topublic Object invoke(MethodInvocation arg0) throws Throwable
Thread for execution
and subsequently reseting it.invoke in interface MethodInterceptorThrowableMethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)public boolean doLogin(boolean readOnly,
boolean isClose)
Version: 5.1.1-ice35-b43
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.