Skip to content
Snippets Groups Projects
Select Git revision
  • eddb94d35f2a2ad41c801991857153097b08d1e7
  • 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

ChatUpdate.java

Blame
  • Forked from Ho Dac Hai / COMP90015-DSAss2-InfinityMonkeys-remaster
    Source project has a limited visibility.
    ChatUpdate.java 759 B
    package client;
    
    import remote.IChatUpdate;
    
    import java.io.Serializable;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    
    public class ChatUpdate extends UnicastRemoteObject implements IChatUpdate, Serializable
    {
        private Client client;
    
        public ChatUpdate(Client client) throws RemoteException
        {
            super();
            this.client = client;
        }
    
        @Override
        public boolean notifyChat(String fromClient, String message) throws RemoteException
        {
    //        client.getChatScreen().setChatOutput(message);
            client.getChatScreen().getChatOutputArea().setText(message);
    
            //client.setReceivedMessage(message);
            System.out.println(fromClient + ": " + message);
            return true;
        }
    
    }