I want to draw UML diagram which represents my Spring boot application. I'm new in UML and don't know how to represent an interaction between two classes that uses other classes for it. I have a class that publishes spring events and a class which handles such events. Publisher example:
import org.springframework.context.ApplicationEventPublisher;
class Publisher {
ApplicationEventPublisher springPublisher;
public publishEvent() {
springPublisher.publishEvent(new SomeEvent());
}
}
Handler:
import org.springframework.context.event.EventListener;
class EventHandler {
@EventListener
public handleEvent(Event event) {
// some processing
}
}
So, when I publish some events via Spring ApplicationEventPublisher my handler handles events via method annotated with @EventListener. But it is not a direct calling of the method. How I can illustrate it on the UML diagram?

