Class Server

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--Server
All Implemented Interfaces:
java.util.Observer, java.rmi.Remote, RServer, java.io.Serializable

public class Server
extends java.rmi.server.UnicastRemoteObject
implements RServer, java.util.Observer

See Also:
Serialized Form

Field Summary
 MasterEngine masterEngine
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Server()
           
 
Method Summary
 void accelerate(int id, boolean value)
           
 void fire(int id, boolean value)
           
 REngine getEngine(int id)
           
 int getId(int player)
           
 int getPlayer(int id)
           
 int login(REngine engine)
           
 void logout(int id)
           
static void main(java.lang.String[] args)
           
 void turnLeft(int id, boolean value)
           
 void turnRight(int id, boolean value)
           
 void update(java.util.Observable body, java.lang.Object topic)
          Receive notification of players' ships death.
 
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
 

Field Detail

masterEngine

public MasterEngine masterEngine
Constructor Detail

Server

public Server()
       throws java.rmi.RemoteException
Method Detail

main

public static void main(java.lang.String[] args)

login

public int login(REngine engine)
          throws GameFullException
Specified by:
login in interface RServer

logout

public void logout(int id)
Specified by:
logout in interface RServer

getEngine

public REngine getEngine(int id)

getPlayer

public int getPlayer(int id)

getId

public int getId(int player)

turnLeft

public void turnLeft(int id,
                     boolean value)
Specified by:
turnLeft in interface RServer

turnRight

public void turnRight(int id,
                      boolean value)
Specified by:
turnRight in interface RServer

accelerate

public void accelerate(int id,
                       boolean value)
Specified by:
accelerate in interface RServer

fire

public void fire(int id,
                 boolean value)
Specified by:
fire in interface RServer

update

public void update(java.util.Observable body,
                   java.lang.Object topic)
Receive notification of players' ships death.
Specified by:
update in interface java.util.Observer