task 5 started.

This commit is contained in:
2025-12-22 00:26:19 +01:00
parent e8f1271f06
commit 01bd4ba693
13 changed files with 293 additions and 14 deletions

View File

@@ -0,0 +1,16 @@
package common;
/**
* ClientInterface interface
*
* @author Tinsae Ghilay
*
*/
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface ClientInterface extends Remote {
void receiveMessage(String fromId, String message) throws RemoteException;
}

View File

@@ -0,0 +1,23 @@
package common;
/**
* ClientInterface interface
*
* @author Tinsae Ghilay
*
*/
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;
public interface ServerInterface extends Remote {
void registerClient(String clientId, ClientInterface client) throws RemoteException;
void sendMessage(String fromId, String toId, String message) throws RemoteException;
void blockClient(String clientId, String blockedId) throws RemoteException;
List<String> getOfflineMessages(String clientId) throws RemoteException;
}