This project consists of a Chat Client and Chat Server implementation using Java RMI (Remote Method Invocation) for network communication.
The Chat-Client folder contains the client-side implementation of the chat application.
ChatClient.java: Manages the connection to the server and provides methods for interacting with the chat service.ChatGUI.java: Implements the graphical user interface for the chat client.ClientMain.java: Contains the main method to start the chat client application.ClientCallbackImpl.java: Implements the callback interface for receiving updates from the server.Message.java: Represents a chat message with sender, recipient, content, and timestamp information.
- Sign in and sign up functionality
- Join and leave chat rooms
- Send private messages and room messages
- File sharing capabilities
- Real-time updates for user status and new messages
The Chat-Server folder contains the server-side implementation of the chat application.
ChatServer.java: Sets up the RMI registry and initializes the chat service.ChatService.java: Defines the remote interface for the chat service.ChatServiceImpl.java: Implements the ChatService interface and manages chat operations.ChatRoom.java: Represents a chat room with its members and messaging functionality.DbContext.java: Handles database operations for persisting chat data.Admin.java: Extends the User class with additional privileges for room management.
- User authentication and registration
- Chat room management (create, join, leave)
- Message routing between users and rooms
- File transfer support
- Persistence of user data and message history
- Compile all Java files in both Chat-Client and Chat-Server folders.
- Start the Chat-Server by running the ChatServer class.
- Launch the Chat-Client by running the ClientMain class or ChatGUI class.
Make sure to have the necessary RMI security policy in place and configure the database connection in the DbContext class before running the application.
- Java RMI
- Swing (for GUI)
- JDBC (for database operations)