{
eventType = eventAdapterService.addBeanType(beanClass.getName(), beanClass, false, true, true);
}
// Construct polling strategy as a method invocation
ConfigurationMethodRef configCache = engineImportService.getConfigurationMethodRef(declaringClass.getName());
if (configCache == null)
{
configCache = engineImportService.getConfigurationMethodRef(declaringClass.getSimpleName());
}
ConfigurationDataCache dataCacheDesc = (configCache != null) ? configCache.getDataCacheDesc() : null;
DataCache dataCache = DataCacheFactory.getDataCache(dataCacheDesc, epStatementAgentInstanceHandle, schedulingService, scheduleBucket);
PollExecStrategy methodPollStrategy = new MethodPollingExecStrategy(eventAdapterService, staticMethod, mapTypeName != null, eventType);
return new MethodPollingViewable(methodStreamSpec, streamNumber, methodStreamSpec.getExpressions(), methodPollStrategy, dataCache, eventType, exprEvaluatorContext);
}