Class ReactionsObservedEventScheduler
java.lang.Object
ch.admin.bit.jeap.reaction.observer.events.scheduler.ReactionsObservedEventScheduler
- All Implemented Interfaces:
org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
public class ReactionsObservedEventScheduler
extends Object
implements org.springframework.context.SmartLifecycle
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionReactionsObservedEventScheduler(ReactionObserverKafkaConfigProperties props, ch.admin.bit.jeap.reaction.observer.core.domain.ReactionObserverService reactionObserverService, KafkaEventProducer kafkaEventProducer) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
getPhase, isAutoStartup, stop
-
Constructor Details
-
ReactionsObservedEventScheduler
public ReactionsObservedEventScheduler(ReactionObserverKafkaConfigProperties props, ch.admin.bit.jeap.reaction.observer.core.domain.ReactionObserverService reactionObserverService, KafkaEventProducer kafkaEventProducer)
-
-
Method Details
-
sendEvent
@Scheduled(fixedRateString="${jeap.reaction.observer.events.observed-event-rate-seconds:300}", initialDelayString="${jeap.reaction.observer.events.observed-event-rate-seconds:300}", timeUnit=SECONDS) public void sendEvent() -
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-