Client: java -jar Client.jar <ip> <port number> <FN_ID> <args>
Server: java -jar Server.jar <port number>
- Account.java
- Holds information about a specific account, such as username, associated authToken and message box.
- Message.java
- Holds information about a specific message, such as sender, receiver, body and message read state. Additionally, each message has an auto-increment identifier.
- client.java
- The client main class. If the command line arguments are valid, it creates a MessagingClient object, otherwise it prints the usage message.
- MessagingClient.java
- Creates a socket and connects to the server, on the given address and port. It sends the entered command line arguments to the server and waits for response.
- server.java
- The server main class. If the command line arguments are valid, it creates a MessagingServer object, otherwise it prints the usage message.
- MessagingServer.java
- Creates a socket on the given port and listens for connections. For every new client, a ClientHandler object is created, in a new thread.
- ClientHandler.java
- ClientHandler class instances are intended to be executed by a new thread. In run() method the command line arguments of client are received and passed to the RequestHandler.
- RequestHandler.java
- Processes client requests. Based on the request FN_ID, calls the appropriate method. The supported
methods are:
- CreateAccount(): creates a new account
- ShowAccounts(): shows registered accounts
- SendMessage(): sends new message to user
- ShowInbox(): shows user inbox
- ReadMessage(): reads a message from inbox
- DeleteMessage(): delete a message from inbox
- Processes client requests. Based on the request FN_ID, calls the appropriate method. The supported
methods are: