Class ObjectStore

java.lang.Object
com.jme3.network.rmi.ObjectStore

public class ObjectStore extends Object
Legacy RMI object registry for exposing local objects and resolving remote proxies.
  • Constructor Details

    • ObjectStore

      public ObjectStore(Client client)
      Creates an object store bound to a client.
      Parameters:
      client - the client that owns the store
    • ObjectStore

      public ObjectStore(Server server)
      Creates an object store bound to a server.
      Parameters:
      server - the server that owns the store
  • Method Details

    • exposeObject

      public void exposeObject(String name, Object obj) throws IOException
      Exposes a local object to the remote side under the specified name.
      Parameters:
      name - the exported object name
      obj - the local object to expose
      Throws:
      IOException - if serialization or transport setup fails
    • getExposedObject

      public <T> T getExposedObject(String name, Class<T> type, boolean waitFor) throws InterruptedException
      Looks up an exposed remote object and returns a proxy implementing the requested type.
      Type Parameters:
      T - the requested proxy type
      Parameters:
      name - the exported object name
      type - the interface the proxy should implement
      waitFor - true to wait until the object appears
      Returns:
      the remote object proxy
      Throws:
      InterruptedException - if interrupted while waiting