So I'm creating an application that uses the same type of framework that the chat example implements. My difference is that in my case I will have some server side authentication going on. This means that I will need to test some received messages and then handle the UI accordingly. My problem is that I don't know how to either:
1) Test in the Connection class and alert the UI that authentication has passed/failed.
2) Test the received message in the UI for validation. The problem here is that the UI won't know when the message has been received to test it in the first place.
What the best way to approach this problem?