What design framework implements the Java Executor framework?

I understand that it is very similar to Abstract Factory.

Note:

Artist Interface:

public interface Executor {
     public void execute();
}

And then there is a class Executorscontaining static factories for various implementations Executor.

+4
source share
1 answer

This is not an Abstract Factory . This is a Mediator combined with Command .

The performer interface is a team template. The implementation execute()obeys the team.

According to GoF, the intent of the pick pattern is:

, . .

JDK

java.util.Timer scheduleXXX()

java.util.concurrent.Executor execute().

java.lang.reflect.Method invoke()

. .

+4

Source: https://habr.com/ru/post/1611663/


All Articles