file: Chat.java
/* Notes:
- signIn() is used for both connecting and disconnecting. In the
connect mode, "i=-1", the String contains a Chat-name. If the
connection is accepted a connection_slot betwee 0 and 49 is returned.
In the disconnect mode, "0<i<50", the String is ignored.
- broadcast() sends a Chat-message s from connection_slot "i". The server translates the slot number to its Chat-name.
- getbroadcast() is used to pole the server for a new Chat-message.
*/
import java.rmi.*;
public interface Chat extends java.rmi.Remote {
int signIn(String s, int i) throws java.rmi.RemoteException;
void broadcast(String s,int i ) throws java.rmi.RemoteException;
String getbroadcast() throws java.rmi.RemoteException;
}