client
Class GameObserver

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--client.GameObserver

public class GameObserver
extends java.rmi.server.UnicastRemoteObject
implements RemoteObserver

Called by the RemoteGame when it changes state. This is the only Remote object exported by the client to the server. GameObserver is a separate entity since GameView cannot also be a Remote object.

Version:
3.0 1999-04-02
Author:
Oscar.Nierstrasz@acm.org
See Also:
GameView.update(server.Move), Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
GameObserver()
          Must be declared since we inherit from UnicastRemoteObject
GameObserver(GameView view)
          This is the constructor to use.
 
Method Summary
 void update(Move move)
          Implements the RemoteObserver interface.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameObserver

public GameObserver()
             throws java.rmi.RemoteException
Must be declared since we inherit from UnicastRemoteObject

GameObserver

public GameObserver(GameView view)
             throws java.rmi.RemoteException
This is the constructor to use.
Method Detail

update

public void update(Move move)
            throws java.rmi.RemoteException
Implements the RemoteObserver interface. Called by the BoardGame when its state changes.
Specified by:
update in interface RemoteObserver
Parameters:
move - an instance of Move