- // this is for providing of scenario state synchronization
- protected static class ScenarioInterceptor implements MethodInterceptor {
- @Override
- public Object intercept(Object obj, Method method, Object[] args,
- MethodProxy proxy) throws Throwable {
- try {
- Object result = proxy.invokeSuper(obj, args);
- return result;
- } finally {
- Collection<CommonOneCStepSet> existengStepSets = ((CommonOneCStepSet) obj).initedStepSetMap
- .values();
- for (CommonOneCStepSet oneCStepSet : existengStepSets) {
- oneCStepSet.syncStepSets((CommonOneCStepSet) obj);
- }
- }
- }
- }