use of com.jme3.network.rmi.ObjectStore in project jmonkeyengine by jMonkeyEngine.
the class TestRemoteCall method main.
public static void main(String[] args) throws IOException, InterruptedException {
Serializer.registerClass(Savable.class, new SavableSerializer());
createServer();
Client client = Network.connectToServer("localhost", 5110);
client.start();
ObjectStore store = new ObjectStore(client);
ServerAccess access = store.getExposedObject("access", ServerAccess.class, true);
boolean result = access.attachChild("Models/Oto/Oto.mesh.xml");
System.out.println(result);
}
use of com.jme3.network.rmi.ObjectStore in project jmonkeyengine by jMonkeyEngine.
the class TestRemoteCall method createServer.
public static void createServer() {
serverApp = new SimpleApplication() {
@Override
public void simpleInitApp() {
}
};
serverApp.start();
try {
Server server = Network.createServer(5110);
server.start();
ObjectStore store = new ObjectStore(server);
store.exposeObject("access", new ServerAccessImpl());
} catch (IOException ex) {
ex.printStackTrace();
}
}
Aggregations