X
X
xxxxc2019-07-08 16:42:44
Java
xxxxc, 2019-07-08 16:42:44

How to get events from other objects?

Good afternoon! Tell me who knows how this is done, is there some kind of pattern or what is better?
For example, there is an interface with some events (newEvent, deleteEvent) that receive them through WSS. This interface is implemented by different classes.
And I need a class that can handle all these events. That is, it should be one method that will immediately see these events.
What is the best way to do this? Despite the fact that the first two classes do not know anything about the class that will process them.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cheypnow, 2019-07-08
@Cheypnow

Observer in Java

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question