/** * @param inthreadContext * The threadContext to set. */ public void SetThreadContext(NetMeterContext inthreadContext) { if (threadContext != null) { if (inthreadContext != threadContext) { throw new Exception("Attempting to reset the thread context"); } } this.threadContext = inthreadContext; }
/** * @return Returns the threadContext. */ public NetMeterContext getThreadContext() { if (threadContext == null) { /* * Only samplers have the thread context set up by JMeterThread at * present, so suppress the warning for now */ // log.warn("ThreadContext was not set up - should only happen in // JUnit testing..." // ,new Throwable("Debug")); threadContext = NetMeterContextManager.GetContext(); } return(threadContext); }