Skip to content
Snippets Groups Projects
Select Git revision
  • 033d77a7c19490d1599423a00d0ea2f0e2b19a63
  • master default protected
  • hai
  • isaac
  • CheHao
  • Eldar
  • mpriymak
  • master-before-merging-with-hai
  • master-before-merging-with-isaac
  • rmi-working-before-merging-with-isaac
  • all-code-merged-by-hai-v1
11 results

ClientUpdate.java

Blame
  • Forked from Ho Dac Hai / COMP90015-DSAss2-InfinityMonkeys-remaster
    Source project has a limited visibility.
    ClientUpdate.java 624 B
    package client;
    
    import remote.IClientUpdate;
    
    import java.io.Serializable;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    
    public class ClientUpdate extends UnicastRemoteObject implements IClientUpdate, Serializable {
    
        private Client client;
    
        public ClientUpdate(Client client) throws RemoteException
        {
            super();
            this.client = client;
        }
    
        @Override
        public boolean notifyClient(String fromClient, String newUsername) throws RemoteException
        {
            client.getChatScreen().getSentMessageToComboBox().addItem(newUsername);
    
            return true;
        }
    }