Search in sources :

Example 31 with IsSendingAsyncMessage

use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.

the class JobRestartRequestService method triggerJobHardRestartRequest.

@IsSendingAsyncMessage(MessageID.REQUEST_JOB_RESTART_HARD)
private void triggerJobHardRestartRequest(JobMessage message) {
    DomainMessage infoRequest = DomainMessageFactory.createEmptyRequest(MessageID.REQUEST_JOB_RESTART_HARD);
    infoRequest.set(MessageDataKeys.JOB_RESTART_DATA, message);
    infoRequest.set(MessageDataKeys.ENVIRONMENT_BASE_URL, sechubEnvironment.getServerBaseUrl());
    eventBusService.sendAsynchron(infoRequest);
}
Also used : DomainMessage(com.mercedesbenz.sechub.sharedkernel.messaging.DomainMessage) IsSendingAsyncMessage(com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage)

Example 32 with IsSendingAsyncMessage

use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.

the class UpdateMappingService method sendEvent.

@IsSendingAsyncMessage(MessageID.MAPPING_CONFIGURATION_CHANGED)
private void sendEvent(Mapping mapping) {
    MappingMessage mappingMessage = new MappingMessage();
    mappingMessage.setMappingId(mapping.getId());
    mappingMessage.setMappingData(MappingData.fromString(mapping.getData()));
    DomainMessage request = DomainMessageFactory.createEmptyRequest(MessageID.MAPPING_CONFIGURATION_CHANGED);
    request.set(MessageDataKeys.CONFIG_MAPPING_DATA, mappingMessage);
    eventBus.sendAsynchron(request);
}
Also used : MappingMessage(com.mercedesbenz.sechub.sharedkernel.messaging.MappingMessage) DomainMessage(com.mercedesbenz.sechub.sharedkernel.messaging.DomainMessage) IsSendingAsyncMessage(com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage)

Aggregations

IsSendingAsyncMessage (com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage)32 DomainMessage (com.mercedesbenz.sechub.sharedkernel.messaging.DomainMessage)31 UserMessage (com.mercedesbenz.sechub.sharedkernel.messaging.UserMessage)10 JobMessage (com.mercedesbenz.sechub.sharedkernel.messaging.JobMessage)4 ProjectMessage (com.mercedesbenz.sechub.sharedkernel.messaging.ProjectMessage)4 AuthUser (com.mercedesbenz.sechub.domain.authorization.AuthUser)1 AdministrationConfigMessage (com.mercedesbenz.sechub.sharedkernel.messaging.AdministrationConfigMessage)1 MappingMessage (com.mercedesbenz.sechub.sharedkernel.messaging.MappingMessage)1 SchedulerMessage (com.mercedesbenz.sechub.sharedkernel.messaging.SchedulerMessage)1 UseCaseAdminAcceptsSignup (com.mercedesbenz.sechub.sharedkernel.usecases.admin.signup.UseCaseAdminAcceptsSignup)1