task 5 started.
This commit is contained in:
16
week3_TinsaeGhilay/Task 5/src/common/ClientInterface.java
Normal file
16
week3_TinsaeGhilay/Task 5/src/common/ClientInterface.java
Normal 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;
|
||||
|
||||
}
|
||||
23
week3_TinsaeGhilay/Task 5/src/common/ServerInterface.java
Normal file
23
week3_TinsaeGhilay/Task 5/src/common/ServerInterface.java
Normal 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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user