netwar.network
Interface NetworkServerInterface

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
NetworkServer

public interface NetworkServerInterface
extends java.rmi.Remote

Remote interface for NetworkServer. The methods in here are remotely accessable by NetworkClients.

Author:
Group N2-Project Netwar, Jason Komutrattananon

Method Summary
 void broadcastSettings(int callingPlayer, PlayerSettings playerSettings, GlobalSettings globalSettings)
          Sends the settings the player made to the server.
 int callerID(NetworkClientInterface Client)
          Sends the networkClientInterface to the server so the server can talk back to the client without the host user having to input the ip address of the client
 void setCommand(int playerNumber, Command remotePlayersCommand)
          Sends the command the player made to the server
 

Method Detail

setCommand

public void setCommand(int playerNumber,
                       Command remotePlayersCommand)
                throws java.rmi.RemoteException
Sends the command the player made to the server
Parameters:
playerNumber - The number of the player that set the command.
remotePlayersCommand - The command the player made that needs to be broadcast to the server.
Throws:
java.rmi.RemoteException - In the case of not being able to connect or send data to the remote computer.

callerID

public int callerID(NetworkClientInterface Client)
             throws java.rmi.RemoteException
Sends the networkClientInterface to the server so the server can talk back to the client without the host user having to input the ip address of the client
Parameters:
Client - The number of the player that set the command.
Throws:
java.rmi.RemoteException - In the case of not being able to connect or send data to the remote computer.

broadcastSettings

public void broadcastSettings(int callingPlayer,
                              PlayerSettings playerSettings,
                              GlobalSettings globalSettings)
                       throws java.rmi.RemoteException
Sends the settings the player made to the server.
Parameters:
callingPlayer - The number of the player that called the method.
playerSettings - The player's settings that will be sent to the server.
GlobalSettings - The global settings that will be sent to the server.
Throws:
java.rmi.RemoteException - In the case of not being able to connect or send data to the remote computer.