Methapolis  0.27
 All Classes Namespaces Files Functions Variables Enumerator
NetworkServer.java
Go to the documentation of this file.
1 package micropolisj.network;
2 
3 import java.rmi.Naming;
4 
5 public class NetworkServer {
6 
7  public static final String NAMING_BIND = "remoteLogic";
8 
10 
11  //TODO replace remoteLogic with constant
12 
14  this.server = server;
15  try {
16  java.rmi.registry.LocateRegistry.createRegistry(1099);
17  System.out.println("RMI registry ready.");
18  Naming.bind("remoteLogic", this.server);
19 
20  } catch (Exception e) {
21  e.printStackTrace();
22  }
23  }
24  }