|
J2ME RMI Profile | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
java.rmi | Provides the RMI package. |
java.rmi.activation | Provides support for RMI Object Activation. |
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC). |
java.rmi.registry | Provides a class and two interfaces for the RMI registry. |
java.rmi.server | Provides classes and interfaces for supporting the unicast server side of RMI. |
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.
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.
This specification requires support of marshalled object
manipulation and persistence through the
java.rmi.MarshalledObject
API.
The J2SE 1.3 RMI specification describes a wire protocol which enables remote method invocations to be carried out over a network. Except where noted below, implementations of this profile must support this wire protocol (known as JRMP or Java Remote Method Protocol).
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.
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.
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.
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
.
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:
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.
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.
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.
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)
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.
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
java.rmi.server.disableHttp
java.rmi.activation.port
java.rmi.loader.packagePrefix
java.rmi.registry.packagePrefix
java.rmi.server.packagePrefix
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).
|
J2ME RMI Profile | |||||||||
PREV NEXT | FRAMES NO FRAMES |