Implemented RemovedEventListener... #51

Merged
rahimiankeanu merged 3 commits from ExecutorRemovedEventListenerMqttAdapter into dev 2021-11-14 15:12:10 +00:00
Showing only changes of commit e0e54f9350 - Show all commits

View File

@ -1,6 +1,14 @@
package ch.unisg.tapas.auctionhouse.adapter.in.messaging.http;
import ch.unisg.tapas.auctionhouse.application.handler.ExecutorRemovedHandler;
import ch.unisg.tapas.auctionhouse.application.port.in.ExecutorRemovedEvent;
import ch.unisg.tapas.auctionhouse.domain.Auction;
import ch.unisg.tapas.auctionhouse.domain.ExecutorRegistry;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
/**
@ -12,5 +20,13 @@ public class ExecutorRemovedEventListenerHttpAdapter {
// TODO: add annotations for request method, request URI, etc.
public void handleExecutorRemovedEvent(@PathVariable("executorId") String executorId) {
// TODO: implement logic
ExecutorRemovedEvent executorRemovedEvent = new ExecutorRemovedEvent(
new ExecutorRegistry.ExecutorIdentifier(executorId)
);
ExecutorRemovedHandler newExecutorHandler = new ExecutorRemovedHandler();
newExecutorHandler.handleExecutorRemovedEvent(executorRemovedEvent);
}
}