Package com.jme3.network.service.rmi
Class RmiRegistry
java.lang.Object
com.jme3.network.service.rmi.RmiRegistry
-
Constructor Summary
ConstructorDescriptionRmiRegistry
(HostedConnection context, RpcConnection rpc, short rmiId, byte defaultChannel) RmiRegistry
(RpcConnection rpc, short rmiId, byte defaultChannel) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRemoteClass
(ClassInfo info) protected void
addRemoteObject
(byte channel, short objectId, String name, ClassInfo typeInfo) <T> T
getLocalObject
(Class<T> type) Returns a local object that was previously registered with share() using just type registration.<T> T
getLocalObject
(String name, Class<T> type) Returns a local object that was previously registered with share() using name registration.<T> T
getRemoteObject
(Class<T> type) Looks up a remote object by type and returns a local proxy to the remote object that was shared on the other end of the network connection.<T> T
getRemoteObject
(String name, Class<T> type) Looks up a remote object by name and returns a local proxy to the remote object that was shared on the other end of the network connection.protected Object
invokeLocal
(short objectId, short procId, Object[] args) Handle the actual remote object method calls.protected Object
invokeRemote
(byte channel, short objectId, short procId, CallType callType, Object[] args) protected void
removeRemoteObject
(short objectId) protected void
Handle remote object registry updates from the other end.<T> void
Exposes, through a specific connection channel, the specified object to the other end of the connection as the specified interface type and associates it with the specified name.<T> void
Exposes, through a specific connection channel, the specified object to the other end of the connection as the specified interface type.<T> void
Exposes the specified object to the other end of the connection as the specified interface type and associates it with the specified name.<T> void
Exposes the specified object to the other end of the connection as the specified interface type.
-
Constructor Details
-
RmiRegistry
-
RmiRegistry
-
-
Method Details
-
getLocalObject
Returns a local object that was previously registered with share() using just type registration. -
getLocalObject
Returns a local object that was previously registered with share() using name registration. -
getRemoteObject
Looks up a remote object by type and returns a local proxy to the remote object that was shared on the other end of the network connection. If this is called from a client then it is accessing a shared object registered on the server. If this is called from the server then it is accessing a shared object registered on the client. -
getRemoteObject
Looks up a remote object by name and returns a local proxy to the remote object that was shared on the other end of the network connection. If this is called from a client then it is accessing a shared object registered on the server. If this is called from the server then it is accessing a shared object registered on the client. -
addRemoteClass
-
removeRemoteObject
protected void removeRemoteObject(short objectId) -
addRemoteObject
-
invokeRemote
-
rmiUpdate
Handle remote object registry updates from the other end. -
invokeLocal
Handle the actual remote object method calls.