/** * Check if the external thread is accessing. * @return True, if access is ok. */ public boolean isExternalThread() { return initthread!=Thread.currentThread() && !isPlanThread() && !(IComponentDescription.STATE_TERMINATED.equals(getComponentDescription().getState()) && Starter.isRescueThread(getComponentIdentifier())); }
/** * Test if current thread is the component thread. * @return True if the current thread is the component thread. */ public boolean isComponentThread() { return Thread.currentThread()==componentthread || IComponentDescription.STATE_TERMINATED.equals(getComponent().getComponentDescription().getState()) && Starter.isRescueThread(getComponent().getComponentIdentifier()); }
/** * Check if the external thread is accessing. * @return True, if called from an external (i.e. non-synchronized) thread. */ public boolean isExternalThread() { boolean ret = Thread.currentThread()!=componentthread && !(IComponentDescription.STATE_TERMINATED.equals(getDescription().getState()) && Starter.isRescueThread(getComponentIdentifier())); if(ret) ret = getComponentInstance().isExternalThread(); return ret; }
if(!agent.getComponentFeature(IExecutionFeature.class).isComponentThread() && !Starter.isRescueThread(agent.getComponentIdentifier()))
if(getAdapter().isExternalThread() && !Starter.isRescueThread(getAdapter().getComponentIdentifier()))
if(adapter.isExternalThread() && !Starter.isRescueThread(adapter.getComponentIdentifier()))