Class ObjectStore
java.lang.Object
com.jme3.network.rmi.ObjectStore
Legacy RMI object registry for exposing local objects and resolving remote proxies.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassHandles client-side RMI message and connection callbacks.classHandles server-side RMI message and connection callbacks. -
Constructor Summary
ConstructorsConstructorDescriptionObjectStore(Client client) Creates an object store bound to a client.ObjectStore(Server server) Creates an object store bound to a server. -
Method Summary
Modifier and TypeMethodDescriptionvoidexposeObject(String name, Object obj) Exposes a local object to the remote side under the specified name.<T> TgetExposedObject(String name, Class<T> type, boolean waitFor) Looks up an exposed remote object and returns a proxy implementing the requested type.
-
Constructor Details
-
ObjectStore
Creates an object store bound to a client.- Parameters:
client- the client that owns the store
-
ObjectStore
Creates an object store bound to a server.- Parameters:
server- the server that owns the store
-
-
Method Details
-
exposeObject
Exposes a local object to the remote side under the specified name.- Parameters:
name- the exported object nameobj- 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 nametype- the interface the proxy should implementwaitFor- true to wait until the object appears- Returns:
- the remote object proxy
- Throws:
InterruptedException- if interrupted while waiting
-