class QuerySensorSchedulerAction implements ISchedulerAction {

    @Override
    public void execute(final ISchedulerEntry entry) throws SchedulerActionExecutionException {
        try {
            Object queryExecutorDependency = entry.getState().getValue(queryExecutorFieldName);
            IQueryExecutor queryExecutor = IOC.resolve(IOC.resolve(IOC.getKeyForKeyStorage(), queryExecutorDependency));

            Collection<? extends Number> data = queryExecutor.execute(entry);
            Long time = entry.getLastTime();

            IObject message = IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject"));
            message.setValue(dataFieldName, data);
            message.setValue(periodStartFieldName, time);
            message.setValue(periodEndFieldName, time);

            Object chainId = IOC.resolve(Keys.getOrAdd("chain_id_from_map_name"), entry.getState().getValue(statisticsChainFieldName));
            MessageBus.send(message, chainId);
        } catch (ReadValueException | InvalidArgumentException | QueryExecutionException | ResolutionException | ChangeValueException
                | SendingMessageException e) {
            throw new SchedulerActionExecutionException("Error occurred querying or sending statistics.", e);
        }
    }

    public  QuerySensorSchedulerAction();

}