kryonet
kryonet copied to clipboard
ObjectSpace warns on remote invocation if multiple object-spaces are registered to a connection.
ObjectSpace will warn: "Ignoring remote invocation request for unknown object ID" every time it receives a remote method invocation for an object on a different object space on the same connection. (I am using multiple object spaces on the same connection because I need them to have different execution contexts.)
Did you register your object with all of your used object spaces before invoking the objects methods?
No, I only register the object on the object space it's intended to be invoked on. If I registered it with all object spaces, how would the invocation be applied on the correct object space? (If I sounds hostile, I'm not trying to)
The phrase "with all of your used object spaces" was referencing the "on a different object space on the same connection" part in your initial post.
You need to register the object, which should get invoked remotely, on its local object space with an unique id: objectSpace.register(id, object)
. And on the other side you can get an instance of the object via the previously defined ID and the connection to the other endpoint: SomeObject object = ObjectSpace.getRemoteObject(connection, id, SomeObject.class)
. If you need a more in-depth example you can take a look a this one: chatrmi
@gretchenfrage Please provide an executable example that shows the problem. http://sscce.org/