Universal TeacherStub and Skeleton Interfaces

 

The Remote Stub class

This java.rmi.server.RemoteStub class is the super class for stubs of remote objects.

 

The RemoteRef Interface

The java.rmi.server.RemoteRef interface represents a reference for a remote object. To carry out a remote method invocation, the stub uses a remote reference. This interface is not normally used by programmers using RMI but rather by those implementing their own RMI system.

Methods

  • public String getRefClass(ObjectOutput out) - This method returns the class name of the reference type to be serialized onto the stream "out".
  • public Object invoke(Remote obj, Method method, Object[] params, long opnum) - This method delegates method invocation to the stub(s) remote reference.
  • public boolean remoteEquals(RemoteRef obj) - This method may be used to compare two remote objects.
  • public int remoteHashCode() - This method returns a hash code for a remote object.
  • public String remoteToString() - This method returns a string representation of the remote object.

 

The ServerRef Interface

It represents the server-side handle for a remote object.

Methods

  • public RemoteStub exportObject(Remote obj, Object data) - This method creates a client stub object for the specified remote object.
  • public String getClientHost() - This method returns the hostname of client.

In Java, garbage collector automatically releases memory resources when they are no longer being used. The RMI system uses a reference counting garbage collection algorithm.

 

 

RMI BOOK MAIN PAGE                Top

  
Copyright © 2001 www.universalteacher.com