Search in sources :

Example 16 with Event

use of reactor.bus.Event in project cloudbreak by hortonworks.

the class LogContextAspects method buildLogContextForPersistenceHandler.

@Before("com.sequenceiq.cloudbreak.logger.LogContextAspects.interceptResourcePersistenceHandlerAcceptMethod()")
public void buildLogContextForPersistenceHandler(JoinPoint joinPoint) {
    Event<ResourceNotification> event = (Event<ResourceNotification>) joinPoint.getArgs()[0];
    CloudContext cloudContext = event.getData().getCloudContext();
    buildMdcContext(cloudContext, event);
    LOGGER.debug("A Resource persistence handler's 'accept' method has been intercepted: {}, MDC logger context is built.", joinPoint.toShortString());
}
Also used : ResourceNotification(com.sequenceiq.cloudbreak.cloud.notification.model.ResourceNotification) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) Event(reactor.bus.Event) Before(org.aspectj.lang.annotation.Before)

Aggregations

Event (reactor.bus.Event)16 CloudConnector (com.sequenceiq.cloudbreak.cloud.CloudConnector)10 AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)10 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)10 CloudInstance (com.sequenceiq.cloudbreak.cloud.model.CloudInstance)3 CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)3 CloudResourceStatus (com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus)3 ResourcesStatePollerResult (com.sequenceiq.cloudbreak.cloud.task.ResourcesStatePollerResult)3 Stack (com.sequenceiq.cloudbreak.domain.Stack)3 InstancesStatusResult (com.sequenceiq.cloudbreak.cloud.event.instance.InstancesStatusResult)2 CloudConnectorException (com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException)2 CloudCredentialStatus (com.sequenceiq.cloudbreak.cloud.model.CloudCredentialStatus)2 CloudStack (com.sequenceiq.cloudbreak.cloud.model.CloudStack)2 CloudVmInstanceStatus (com.sequenceiq.cloudbreak.cloud.model.CloudVmInstanceStatus)2 ResourceNotification (com.sequenceiq.cloudbreak.cloud.notification.model.ResourceNotification)2 UnhealthyInstancesDetectionRequest (com.sequenceiq.cloudbreak.reactor.api.event.resource.UnhealthyInstancesDetectionRequest)2 Before (org.aspectj.lang.annotation.Before)2 Test (org.junit.Test)2 Acceptable (com.sequenceiq.cloudbreak.cloud.Acceptable)1 CloudPlatformRequest (com.sequenceiq.cloudbreak.cloud.event.CloudPlatformRequest)1