RMINetwork - lembang/GreenTeam331 GitHub Wiki

RMI Client

A class to communicate with the SnakeLadderMulti class, work as an interface between the client interface with the board interface.


createConnection(int port)
-> Create connection to Java RMI registry service


getStrRMIAddress()
-> get the RMI Server from the client to be passed to the interface, this is part of encapsulation for String IP Address


connect(String username)
-> to pass the username


getNumber()
-> get player # from the server


setStrRMIAddress(String strRMIAddress)
-> set the RMI address to get RMI Registry address


getStrIPAddress()
-> get the RMI address, this is part of encapsulation for String IP Address


setStrIPAddress(String strIPAddress)
->set the IP Address for the RMI registry service (from the client to the server side)


GLadder()
-> retrieve initial Ladder from the server.


GSnake()
-> retrieve initial Snake from the server.


GStar()
-> retrieve initial Stars from the server.


  • RemoteImplementation
  • RemoteInterface

Both are an interface that been using by the RMI service, interface is for the interface from client to talk to the server and RemoteImplementation is a stub class that required by RMI. All the method in interface & implementation are exactly similar with the one on StandaloneServer.RMIServerUI class.