@Configuration
@EnableConfigurationProperties(value={HttpClientProperties.class,InstanceInfoProperties.class,ClientProperties.class})
public class LifecycleEventSendConfiguration
extends java.lang.Object
Startup event contains information about instance and their configuration, shutdown event include same information
without configuration. Events creates with EventFactory instances. Each of them has qualifier and can be
autowired in other part of context.
Client instances can be disabled with property org.ametiste.scm.messaging.sender.client.enabled. By default
configuration create two clients: one for each lifecycle event. Startup event send after context constructed
(method with PostConstruct annotation. Shutdown event before context destroy (method with PreDestroy
annotation).
All configuration can be excluded from context with property org.ametiste.scm.messaging.sender.enabled set to false.
| Constructor and Description |
|---|
LifecycleEventSendConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
org.ametiste.scm.messaging.sender.EventSender |
eventSender() |
org.apache.http.client.HttpClient |
eventSenderHttpClient() |
org.ametiste.scm.messaging.sender.client.environment.AppPropertiesAggregator |
propertiesAggregator() |
void |
sendShutdownEvent() |
void |
sendStartupEvent() |
org.ametiste.scm.messaging.sender.client.event.EventFactory |
shutdownEventFactory() |
org.ametiste.scm.messaging.sender.client.EventSenderClient |
shutdownEventSenderClient() |
org.ametiste.scm.messaging.sender.client.event.EventFactory |
startupEventFactory() |
org.ametiste.scm.messaging.sender.client.EventSenderClient |
startupEventSenderClient() |
@Bean public org.apache.http.client.HttpClient eventSenderHttpClient()
@Bean public org.ametiste.scm.messaging.sender.EventSender eventSender()
@Bean public org.ametiste.scm.messaging.sender.client.environment.AppPropertiesAggregator propertiesAggregator()
@Bean
@Qualifier(value="startupEventFactory")
public org.ametiste.scm.messaging.sender.client.event.EventFactory startupEventFactory()
throws java.net.URISyntaxException
java.net.URISyntaxException@Bean
@Qualifier(value="shutdownEventFactory")
public org.ametiste.scm.messaging.sender.client.event.EventFactory shutdownEventFactory()
throws java.net.URISyntaxException
java.net.URISyntaxException@Bean
@Qualifier(value="startupEventSenderClient")
public org.ametiste.scm.messaging.sender.client.EventSenderClient startupEventSenderClient()
throws java.net.URISyntaxException
java.net.URISyntaxException@Bean
@Qualifier(value="shutdownEventSenderClient")
public org.ametiste.scm.messaging.sender.client.EventSenderClient shutdownEventSenderClient()
throws java.net.URISyntaxException
java.net.URISyntaxException@PostConstruct
public void sendStartupEvent()
throws java.net.URISyntaxException
java.net.URISyntaxException@PreDestroy
public void sendShutdownEvent()
throws java.net.URISyntaxException
java.net.URISyntaxException