Class EventService
java.lang.Object
org.springframework.cloud.consul.binder.EventService
- Author:
- Spencer Gibb
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.ecwid.consul.v1.ConsulClientprotected com.fasterxml.jackson.databind.ObjectMapperprotected ConsulBinderProperties -
Constructor Summary
ConstructorsConstructorDescriptionEventService(ConsulBinderProperties properties, com.ecwid.consul.v1.ConsulClient consul, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<com.ecwid.consul.v1.event.model.Event>filterEvents(List<com.ecwid.consul.v1.event.model.Event> toFilter, Long lastIndex) from https://github.com/hashicorp/consul/blob/master/watch/funcs.go#L169-L194 .com.ecwid.consul.v1.event.model.Eventcom.ecwid.consul.v1.ConsulClientList<com.ecwid.consul.v1.event.model.Event>List<com.ecwid.consul.v1.event.model.Event>com.ecwid.consul.v1.Response<List<com.ecwid.consul.v1.event.model.Event>>voidinit()protected List<com.ecwid.consul.v1.event.model.Event>readEvents(com.ecwid.consul.v1.Response<List<com.ecwid.consul.v1.event.model.Event>> response) List<com.ecwid.consul.v1.event.model.Event>watch()List<com.ecwid.consul.v1.event.model.Event>
-
Field Details
-
properties
-
consul
protected com.ecwid.consul.v1.ConsulClient consul -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
EventService
public EventService(ConsulBinderProperties properties, com.ecwid.consul.v1.ConsulClient consul, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
getConsulClient
public com.ecwid.consul.v1.ConsulClient getConsulClient() -
init
@PostConstruct public void init() -
getLastIndex
-
fire
-
getEventsResponse
public com.ecwid.consul.v1.Response<List<com.ecwid.consul.v1.event.model.Event>> getEventsResponse() -
getEvents
-
getEvents
-
watch
-
watch
-
readEvents
-
filterEvents
protected List<com.ecwid.consul.v1.event.model.Event> filterEvents(List<com.ecwid.consul.v1.event.model.Event> toFilter, Long lastIndex) from https://github.com/hashicorp/consul/blob/master/watch/funcs.go#L169-L194 .- Parameters:
toFilter- events to filterlastIndex- last index to pick from the list of events- Returns:
- filtered list of events
-