class EmbeddedSensorObservationPeriod implements IEmbeddedSensorObservationPeriod {

    @Override
    public boolean recordProcessor(final IMessageProcessor mp, final long time)
            throws EmbeddedSensorStrategyException, InvalidArgumentException {
        if (isCountLimited() && !isStartedAt(time)) {
            return false;
        }

        if (!incrementCount()) {
            strategy.updatePeriod(state, mp, time);
            return false;
        } else {
            return true;
        }
    }

    public  EmbeddedSensorObservationPeriod(final long start, final long end, final long nItems, final IEmbeddedSensorStrategy<TState> strategy);

}