About JCP
Get Involved
Community Resources
Community News
FAQ
Contact Us
|
|
Java2 Platform, Micro Edition, Remote Method Invocation
Java 2 Platform, Micro Edition, Remote Method Invocation
Specification v0.1
Last updated 08/18/2000
Introduction
The Java 2 Platform, Micro Edition, Remote Method Invocation (RMI)
Profile is a J2ME Connected Device Configuration (CDC) Profile. The
J2ME CDC requires a complete implementation of the Java Virtual
Machine, including the core Java APIs, java.lang ,
java.net , and java.io . Implementations of
the RMI Profile can only function on devices which include support for
the J2ME CDC and the Foundation Profile.
This document assumes that the reader is familiar with the Connected
Limited Device Configuration (CLDC) specification available at
http://java.sun.com/aboutJava/communityprocess/review/jsr030/index.html,
the CDC specification available at
http://java.sun.com/aboutJava/communityprocess/review/jsr036/index.html,
the Foundation Profile specification available at
http://java.sun.com/aboutJava/communityprocess/review/jsr046/index.html,
and the J2SE 1.3 RMI specification at
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmiTOC.html.
Note that J2ME Configurations and Profiles are defined in the
Connected Limited Device Configuration Specification, Appendix 1.
This document specifies the subset of the J2SE 1.3 RMI API that is
included in the RMI Profile. Information on the J2SE 1.3 RMI API is
available at
http://java.sun.com/j2se/1.3/docs/api/java/rmi/package-summary.html
This specification was developed under the Java Community Process.
More information on the Java Community Process is available at
http://java.sun.com/jcp.
Relationship to the J2SE 1.3 API Specification
The API for the RMI Profile for J2ME is the minimal subset of the J2SE
1.3 RMI API that may be used with J2ME. Where not explicitly stated,
the RMI Profile conforms to the J2SE 1.3 RMI specification. Classes
from the J2SE 1.3 RMI API can either be completely supported, or
modified in ways allowed by the Configurations and Profiles
Architecture Specification. Implementations of the RMI profile must
support the following "client-oriented" interfaces and
functionality specified by the RMI J2SE 1.3 API :
-
Full RMI call semantics
The RMI infrastructure supports passing serializable objects as
the parameters and return values of remote method calls. When the
code for the objects in a remote call is not available in a JVM
which is receiving a given serialized or "marshalled"
object, RMI will utilize dynamic class loading to make the class
bytes for that object available to that JVM. Implementations of
the RMI profile must implement full RMI call semantics including
dynamic class loading.
-
Marshalled object support
This specification requires support of marshalled object
manipulation and persistence through the
java.rmi.MarshalledObject API.
-
Export of remote objects through the
UnicastRemoteObject API
This specification requires implementations of the RMI profile to
support the "export" of unicast remote implementation
objects. When a remote object implementation is exported to the RMI
runtime, remote method invocations from clients of that object will
be dispatched to and executed by the implementation object.
-
Client and server side distributed garbage collection and
garbage collector interfaces
An implementation of the RMI profile must include these interfaces
and support the RMI distributed garbage collection mechanism that
allows remote implementation objects to be garbage collected when
all remote and local references to that object have been
discarded.
-
The activator interface and the client side activation protocol
As of J2SE v1.2, RMI remote object stubs can contain a remote
reference to an "Activatable" object. Activatable
objects can be active or inactive. Remote references to
activatable objects engage in an activation protocol that causes
an inactive remote object to become active when a remote method is
invoked on the object. The remote reference contained in a client
stub object is responsible for engaging in the activation
protocol. An implementation of the RMI profile must support a
remote object reference type which will engage in the activation
protocol.
-
Registry interfaces and export of a Registry remote object
An implementation of the RMI profile must support lookup of
remote objects through the use of the standard location interfaces
java.rmi.registry.Registry ,
java.rmi.registry.LocateRegistry
and the class
java.rmi.Naming .
-
All J2SE 1.3 RMI properties except those noted in the section
below are part of the RMI Profile API.
- The complete J2SE 1.3 RMI Profile API is also part of this
specification
The following interfaces and functionality defined by the J2SE 1.3
RMI specification and public API are not part of this
specification for the RMI profile:
-
RMI Through Firewalls Via Proxies
The RMI protocol for remote call tunneling over HTTP. This
protocol enables clients which are separated from remote objects by
a firewall to "tunnel" remote method calls through the
firewall to the object implementation.
-
RMI's Multiplexing Protocol
The J2SE 1.3 RMI protocol for enabling multiple logical data
streams to be multiplexed onto a single physical data stream. This
protocol can enable two JVMs to invoke symmetric remote methods on
each other even when only a single communication stream exists
between the two JVMs.
-
Implementation Model for an "Activatable" Remote Object
The RMI mechanism for supporting activatable remote object
implementations enables a remote object to become inactive when it
is not in use and to become active when a client invokes a method
on that implementation. Server side support for Activatable
objects and the Remote Method Invocation Daemon (rmid) are not
part of this specification.
The following J2SE 1.3 RMI APIs related to the implementation
model for an "Activatable" object are not part of the RMI Profile
API:
Interfaces:
java.rmi.activation.ActivationInstantiator
java.rmi.activation.ActivationMonitor
java.rmi.activation.ActivationSystem
Classes:
java.rmi.activation.Activatable
java.rmi.activation.ActivationDesc
java.rmi.activation.ActivationGroup
java.rmi.activation.ActivationGroupDesc
java.rmi.activation.ActivationGroupID
java.rmi.activation.UnknownGroupException
See the properties section below for the missing RMI activation
property.
-
Deprecated methods, classes and interfaces
The following RMI J2SE 1.3 APIs that were deprecated as of
J2SE 1.3 are not part of this specification:
Interfaces:
java.rmi.server.ServerRef
Classes:
java.rmi.registry.RegistryHandler
java.rmi.RMISecurityException
java.rmi.server.LoaderHandler
java.rmi.server.LogStream
java.rmi.server.Skeleton
java.rmi.server.SkeletonMismatchException
java.rmi.server.SkeletonNotFoundException
java.rmi.ServerRuntimeException
Methods:
java.rmi.dgc.VMID.isUnique()
java.rmi.server.Operation.getOperation()
java.rmi.server.RemoteCall.getInputStream()
java.rmi.server.RemoteCall.getOuputStream
java.rmi.server.RemoteCall.releaseOuputStream()
java.rmi.server.RemoteCall.releaseInputStream()
java.rmi.server.RemoteCall.getResultStream(boolean)
java.rmi.server.RemoteCall.executeCall()
java.rmi.server.RemoteCall.done()
java.rmi.server.RemoteRef.done(RemoteCall)
java.rmi.server.RemoteRef.invoke(RemoteCall)
java.rmi.server.RemoteRef.newCall(RemoteObject, Operation[], int, long)
java.rmi.server.RemoteStub.setRef(RemoteStub, RemoteRef)
java.rmi.server.RMIClassLoader.getSecurityContext(ClassLoader)
java.rmi.server.RMIClassLoader.loadClass(String)
-
Support for the 1.1 stub/skeleton protocol:
As of JDK1.1, RMI supported a single protocol for communication
between RMI stubs and the RMI runtime which was used to carry out
remote method invocations. In J2SE 1.2, an improved version of
this protocol, was introduced into RMI. The older, JDK 1.1 stub
protocol is not part of this specification. The RMI profile will
only support stubs that use the new 1.2 stub protocol. Stubs
which are compatible with both the 1.1 and 1.2 stub protocols may
be used with the RMI profile, but all RMI profile communication
must be carried out over the 1.2 stub protocol.
-
Stub and Skeleton Compiler
The J2SE 1.3 specification describes a tool that generates and
compiles for RMI stubs and skeletons (known as "rmic").
This RMI profile specification does not require such a stub and
skeleton compiler utility. Applications which need to generate RMI
stub classes to be used with an implementation of the RMI profile,
should use the stub compiler which is part of the J2SE 1.3 RMI
distribution.
Please see the following URLs for further information on rmic:
For the SolarisTM operating environment:
http://java.sun.com/products/jdk/1.3/docs/tooldocs/solaris/rmic.html
For the Microsoft Windows platform:
http://java.sun.com/products/jdk/1.3/docs/tooldocs/win32/rmic.html
Relationship to the CLDC Specification
The RMI Profile requires implementations of the Foundation Profile
and the J2ME CDC. The RMI Profile is not supported by the J2ME
Connected Limited Device Configuration (CLDC).
Class Hierarchy
The following is a list of classes used in J2ME-CDC. The details can be seen
in the javadoc generated section of this specification.
class java.lang.Object
class java.rmi.activation.ActivationID (implements java.io.Serializable)
class java.rmi.dgc.Lease (implements java.io.Serializable)
class java.rmi.registry.LocateRegistry
class java.rmi.MarshalledObject (implements java.io.Serializable)
class java.rmi.Naming
class java.rmi.server.ObjID (implements java.io.Serializable)
class java.rmi.server.Operation
class java.rmi.server.RemoteObject (implements java.rmi.Remote,
java.io.Serializable)
class java.rmi.server.RemoteServer
class java.rmi.server.UnicastRemoteObject
class java.rmi.server.RemoteStub
class java.rmi.server.RMIClassLoader
class java.rmi.server.RMISocketFactory (implements java.rmi.server.RMIClientSocketFactory,
java.rmi.server.RMIServerSocketFactory)
class java.lang.SecurityManager
class java.rmi.RMISecurityManager
class java.lang.Throwable (implements java.io.Serializable)
class java.lang.Exception
class java.rmi.activation.ActivationException
class java.rmi.activation.UnknownObjectException
class java.rmi.AlreadyBoundException
class java.lang.CloneNotSupportedException
class java.rmi.server.ServerCloneException
class java.io.IOException
class java.rmi.RemoteException
class java.rmi.AccessException
class java.rmi.activation.ActivateFailedException
class java.rmi.ConnectException
class java.rmi.ConnectIOException
class java.rmi.server.ExportException
class java.rmi.server.SocketSecurityException
class java.rmi.MarshalException
class java.rmi.NoSuchObjectException
class java.rmi.ServerError
class java.rmi.ServerException
class java.rmi.StubNotFoundException
class java.rmi.UnexpectedException
class java.rmi.UnknownHostException
class java.rmi.UnmarshalException
class java.rmi.NotBoundException
class java.rmi.server.ServerNotActiveException
class java.rmi.server.UID (implements java.io.Serializable)
class java.rmi.dgc.VMID (implements java.io.Serializable)
interface java.rmi.Remote
interface java.rmi.activation.Activator
interface java.rmi.dgc.DGC
interface java.rmi.registry.Registry
interface java.rmi.server.RemoteCall
interface java.rmi.server.RMIClientSocketFactory
interface java.rmi.server.RMIFailureHandler
interface java.rmi.server.RMIServerSocketFactory
interface java.io.Serializable
interface java.io.Externalizable
interface java.rmi.server.RemoteRef
interface java.rmi.server.Unreferenced
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystemms, Inc. 901 San Antonio Road Palo, Alto, California, 94303, U.S.A All Rights Reserved.
|