41 | | ^(Describe your design here.)^ |
| 41 | * ServerConnection: |
| 42 | * Represents a pair (serverURL, User). |
| 43 | * Every connection has 1:1 relation with a client-side facade. |
| 44 | * Has the methods that the facade has, which delegate to the facade's ones. |
| 45 | * The main difference between a connection and a facade is that the facade needs Session ID for most of its methods. |
| 46 | * The facade's methods always return objects of type Response, the connection's ones handle the responses and 'unwrap' them. |
| 47 | * The facade is not visible to others, only to the connection. |
| 48 | * The methods in the !ServerConnection that the facade doesn't have are login(String username, String password), logout(), initSession() and destroySession(). The third one is responsible for getting a session ID from the server and instantiating the private facade, the last one is responsible for destroying the facade in the connection and setting sessionId to null. |
| 49 | |