Class RmiRegistry

java.lang.Object
com.jme3.network.service.rmi.RmiRegistry

public class RmiRegistry extends Object
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    RmiRegistry(HostedConnection context, RpcConnection rpc, short rmiId, byte defaultChannel)
     
    RmiRegistry(RpcConnection rpc, short rmiId, byte defaultChannel)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
    addRemoteObject(byte channel, short objectId, String name, ClassInfo typeInfo)
     
    <T> T
    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
    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
    rmiUpdate(short procId, Object[] args)
    Handle remote object registry updates from the other end.
    <T> void
    share(byte channel, String name, T object, Class<? super T> type)
    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
    share(byte channel, T object, Class<? super T> type)
    Exposes, through a specific connection channel, the specified object to the other end of the connection as the specified interface type.
    <T> void
    share(String name, T object, Class<? super T> type)
    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
    share(T object, Class<? super T> type)
    Exposes the specified object to the other end of the connection as the specified interface type.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

  • Method Details Link icon

    • share Link icon

      public <T> void share(T object, Class<? super T> type)
      Exposes the specified object to the other end of the connection as the specified interface type. The object can be looked up by type on the other end.
    • share Link icon

      public <T> void share(byte channel, T object, Class<? super T> type)
      Exposes, through a specific connection channel, the specified object to the other end of the connection as the specified interface type. The object can be looked up by type on the other end. The specified channel will be used for all network communication specific to this object.
    • share Link icon

      public <T> void share(String name, T object, Class<? super T> type)
      Exposes the specified object to the other end of the connection as the specified interface type and associates it with the specified name. The object can be looked up by the associated name on the other end of the connection.
    • share Link icon

      public <T> void share(byte channel, String name, T object, Class<? super T> type)
      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. The object can be looked up by the associated name on the other end of the connection. The specified channel will be used for all network communication specific to this object.
    • getLocalObject Link icon

      public <T> T getLocalObject(Class<T> type)
      Returns a local object that was previously registered with share() using just type registration.
    • getLocalObject Link icon

      public <T> T getLocalObject(String name, Class<T> type)
      Returns a local object that was previously registered with share() using name registration.
    • getRemoteObject Link icon

      public <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. 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 Link icon

      public <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. 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 Link icon

      protected void addRemoteClass(ClassInfo info)
    • removeRemoteObject Link icon

      protected void removeRemoteObject(short objectId)
    • addRemoteObject Link icon

      protected void addRemoteObject(byte channel, short objectId, String name, ClassInfo typeInfo)
    • invokeRemote Link icon

      protected Object invokeRemote(byte channel, short objectId, short procId, CallType callType, Object[] args)
    • rmiUpdate Link icon

      protected void rmiUpdate(short procId, Object[] args)
      Handle remote object registry updates from the other end.
    • invokeLocal Link icon

      protected Object invokeLocal(short objectId, short procId, Object[] args)
      Handle the actual remote object method calls.