-
Notifications
You must be signed in to change notification settings - Fork 53
PhilSk_messenger_prototype #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| @Override | ||
| public void onMessage(Message msg) { | ||
| log.info("Message received: {}", msg); | ||
| switch (msg.getType().toString()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Он же специально enum, чтобы не сравнивать строки
switch (msg.getType()) {
case MSG_STATUS:
...| switch (type) { | ||
| case "MSG_LOGIN": | ||
| LoginMessage loginMessage = (LoginMessage) msg; | ||
| StatusMessage statusMessage = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот код должен быть в хэндлере, а не здесь. Посмотрите интерфейс Command
| final String ATTR_REF = "ref"; | ||
| final String ATTR_BEAN_ID = "id"; | ||
| final String ATTR_BEAN_CLASS = "class"; | ||
| final String tagBean = "bean"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я же написал комент по этому поводу
No description provided.