Answer the question
In order to leave comments, you need to log in
What design pattern to apply?
Good afternoon
Please tell me which design pattern to apply.
There is an application that processes notifications from different monitoring systems and stores them in a unified form (for example, an event identifier, system type, trigger that caused the event and event status) - already implemented at the moment.
From this application it is necessary to develop a mechanism for approving/acknowledging notifications.
What is at the moment:
public interface Connector {
void validate(String login, String password);
void validate(String token);
void authenticate(String login, String password);
void authenticate(String token);
void acknowledge(String alertId);
List<String> getRules();
}
public enum ConnectorEnum {
ZABBIX(0, "Zabbix", ZabbixConnector.class)
}
Answer the question
In order to leave comments, you need to log in
Well, the way of thinking is generally normal, but it is not clear why Enum. You need something in the style of dispatching by key, but how to do it in Java, you have to think about it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question