Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

J2ME RMI Optional Package

Serialized Form


Package java.rmi

Class java.rmi.AccessException implements Serializable

Class java.rmi.AlreadyBoundException implements Serializable

Class java.rmi.ConnectException implements Serializable

Class java.rmi.ConnectIOException implements Serializable

Class java.rmi.MarshalException implements Serializable

Class java.rmi.MarshalledObject implements Serializable

Serialized Fields

objBytes

byte[] objBytes
Bytes of serialized representation. If objBytes is null then the object marshalled was a null reference.

locBytes

byte[] locBytes
Bytes of location annotations, which are ignored by equals. If locBytes is null, there were no non-null annotations during marshalling.

hash

int hash
Stored hash code of contained object.
See Also:
MarshalledObject.hashCode()

Class java.rmi.NoSuchObjectException implements Serializable

Class java.rmi.NotBoundException implements Serializable

Class java.rmi.RemoteException implements Serializable

Serialized Fields

detail

java.lang.Throwable detail
Nested Exception to hold wrapped remote exception.
 
Since:
JDK1.1

Class java.rmi.ServerError implements Serializable

Class java.rmi.ServerException implements Serializable

Class java.rmi.StubNotFoundException implements Serializable

Class java.rmi.UnexpectedException implements Serializable

Class java.rmi.UnknownHostException implements Serializable

Class java.rmi.UnmarshalException implements Serializable


Package java.rmi.activation

Class java.rmi.activation.ActivateFailedException implements Serializable

Class java.rmi.activation.ActivationException implements Serializable

Serialized Fields

detail

java.lang.Throwable detail
Nested Exception to hold wrapped remote exceptions.
 

Class java.rmi.activation.ActivationID implements Serializable

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
readObject for custom serialization.

This method reads this object's serialized form for this class as follows:

The readObject method is invoked on in to read this object's unique identifier (a UID instance).

Next, the readUTF method is invoked on in to read the external ref type name of the RemoteRef instance for this object's activator. Next, the RemoteRef instance is created of an implementation-specific class corresponding to the external ref type name (returned by readUTF), and the readExternal method is invoked on that RemoteRef instance to read the external form corresponding to the external ref type name.

Note: If the external ref type name is "UnicastRef", "UnicastServerRef", "UnicastRef2", "UnicastServerRef2", "ActivatableRef", or "ActivatableServerRef", a corresponding implementation-specific class must be found, and its readExternal method must read the serial data for that external ref type name as specified to be written in the serialData documentation for this class. If the external ref type name is any other string (of non-zero length), a ClassNotFoundException will be thrown, unless the implementation provides an implementation-specific class corresponding to that external ref type name, in which case the RemoteRef will be an instance of that implementation-specific class.


writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
writeObject for custom serialization.

This method writes this object's serialized form for this class as follows:

The writeObject method is invoked on out passing this object's unique identifier (a UID instance) as the argument.

Next, the getRefClass method is invoked on the activator's RemoteRef instance to obtain its external ref type name. Next, the writeUTF method is invoked on out with the value returned by getRefClass, and then the writeExternal method is invoked on the RemoteRef instance passing out as the argument.

Serial Data:
The serialized data for this class comprises a java.rmi.server.UID (written with ObjectOutput.writeObject) followed by the external ref type name of the activator's RemoteRef instance (a string written with ObjectOutput.writeUTF), followed by the external form of the RemoteRef instance as written by its writeExternal method.

The external ref type name of the RemoteRef instance is determined using the definitions of external ref type names specified in the RemoteObject writeObject method serialData specification. Similarly, the data written by the writeExternal method and read by the readExternal method of RemoteRef implementation classes corresponding to each of the defined external ref type names is specified in the RemoteObject writeObject method serialData specification.

Class java.rmi.activation.UnknownObjectException implements Serializable


Package java.rmi.dgc

Class java.rmi.dgc.Lease implements Serializable

Serialized Fields

vmid

VMID vmid
Virtual Machine ID with which this Lease is associated.
See Also:
Lease.getVMID()

value

long value
Duration of this lease.
See Also:
Lease.getValue()

Class java.rmi.dgc.VMID implements Serializable

Serialized Fields

addr

byte[] addr
array of bytes uniquely identifying host created on

uid

UID uid
unique identifier with respect to host created on


Package java.rmi.server

Class java.rmi.server.ExportException implements Serializable

Class java.rmi.server.ObjID implements Serializable

Serialized Fields

objNum

long objNum
object number
See Also:
ObjID.hashCode()

space

UID space
address space identifier (unique to host)

Class java.rmi.server.RemoteObject implements Serializable

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
readObject for custom serialization.

This method reads this object's serialized form for this class as follows:

The readUTF method is invoked on in to read the external ref type name for the RemoteRef instance to be filled in to this object's ref field. If the string returned by readUTF has length zero, the readObject method is invoked on in, and than the value returned by readObject is cast to RemoteRef and this object's ref field is set to that value. Otherwise, this object's ref field is set to a RemoteRef instance that is created of an implementation-specific class corresponding to the external ref type name returned by readUTF, and then the readExternal method is invoked on this object's ref field.

If the external ref type name is "UnicastRef", "UnicastServerRef", "UnicastRef2", "UnicastServerRef2", or "ActivatableRef", a corresponding implementation-specific class must be found, and its readExternal method must read the serial data for that external ref type name as specified to be written in the serialData documentation for this class. If the external ref type name is any other string (of non-zero length), a ClassNotFoundException will be thrown, unless the implementation provides an implementation-specific class corresponding to that external ref type name, in which case this object's ref field will be set to an instance of that implementation-specific class.


writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
writeObject for custom serialization.

This method writes this object's serialized form for this class as follows:

The getRefClass method is invoked on this object's ref field to obtain its external ref type name. If the value returned by getRefClass was a non-null string of length greater than zero, the writeUTF method is invoked on out with the value returned by getRefClass, and then the writeExternal method is invoked on this object's ref field passing out as the argument; otherwise, the writeUTF method is invoked on out with a zero-length string (""), and then the writeObject method is invoked on out passing this object's ref field as the argument.

Serial Data:
The serialized data for this class comprises a string (written with ObjectOutput.writeUTF) that is either the external ref type name of the contained RemoteRef instance (the ref field) or a zero-length string, followed by either the external form of the ref field as written by its writeExternal method if the string was of non-zero length, or the serialized form of the ref field as written by passing it to the serialization stream's writeObject if the string was of zero length.

If this object is an instance of java.rmi.server.UnicastRemoteObject that does not use custom socket factories, the external ref type name is "UnicastServerRef". If this object is an instance of UnicastRemoteObject that does use custom socket factories, the external ref type name is "UnicastServerRef2".

If this object is an instance of java.rmi.server.RemoteStub that was returned from any of the UnicastRemoteObject.exportObject methods and custom socket factories are not used, the external ref type name is "UnicastRef". If this object is an instance of RemoteStub that was returned from any of the UnicastRemoteObject.exportObject methods and custom socket factories are used, the external ref type name is "UnicastRef2". If this object is an instance of RemoteStub that was returned from any of the java.rmi.activationActivatable.exportObject methods, the external ref type name is "ActivatableRef". If this object is an instance of RemoteStub that was returned from the RemoteObject.toStub method (and the argument passed to toStub was not itself a RemoteStub), the external ref type name is a function of how the remote object passed to toStub was exported, as described above. If this object is an instance of RemoteStub that was originally created via deserialization, the external ref type name is the same as that which was read when this object was deserialized.

Following is the data that must be written by the writeExternal method and read by the readExternal method of RemoteRef implementation classes that correspond to the each of the defined external ref type names:

For "UnicastRef":

  • the hostname of the referenced remote object, written by DataOutput.writeUTF(String)
  • the port of the referenced remote object, written by DataOutput.writeInt(int)
  • the data written as a result of calling java.rmi.server.ObjID.write() on the ObjID instance contained in the reference
  • the boolean value false, written by DataOutput.writeBoolean(boolean)

For "UnicastRef2" with a null client socket factory:

  • the byte value 0x00 (indicating null client socket factory), written by DataOutput.writeByte(int)
  • the hostname of the referenced remote object, written by DataOutput.writeUTF(String)
  • the port of the referenced remote object, written by DataOutput.writeInt(int)
  • the data written as a result of calling java.rmi.server.ObjID.write() on the ObjID instance contained in the reference
  • the boolean value false, written by DataOutput.writeBoolean(boolean)

For "UnicastRef2" with a non-null client socket factory:

  • the byte value 0x01 (indicating non-null client socket factory), written by DataOutput.writeByte(int)
  • the hostname of the referenced remote object, written by DataOutput.writeUTF(String)
  • the port of the referenced remote object, written by DataOutput.writeInt(int)
  • a client socket factory (object of type java.rmi.server.RMIClientSocketFactory), written by passing it to an invocation of writeObject on the stream instance
  • the data written as a result of calling java.rmi.server.ObjID.write() on the ObjID instance contained in the reference
  • the boolean value false, written by DataOutput.writeBoolean(boolean)

For "ActivatableRef" with a null nested remote reference:

  • an instance of java.rmi.activation.ActivationID, written by passing it to an invocation of writeObject on the stream instance
  • a zero-length string (""), written by DataOutput.writeUTF(String)

For "ActivatableRef" with a non-null nested remote reference:

  • an instance of java.rmi.activation.ActivationID, written by passing it to an invocation of writeObject on the stream instance
  • the external ref type name of the nested remote reference, which must be "UnicastRef2", written by DataOutput.writeUTF(String)
  • the external form of the nested remote reference, written by invoking its writeExternal method with the stream instance (see the description of the external form for "UnicastRef2" above)

For "UnicastServerRef" and "UnicastServerRef2", no data is written by the writeExternal method or read by the readExternal method.

Class java.rmi.server.RemoteServer implements Serializable

Class java.rmi.server.RemoteStub implements Serializable

Class java.rmi.server.ServerCloneException implements Serializable

Serialized Fields

detail

java.lang.Exception detail
Nested exception for ServerCloneException.
 
Since:
JDK1.1

Class java.rmi.server.ServerNotActiveException implements Serializable

Class java.rmi.server.UID implements Serializable

Serialized Fields

unique

int unique
Integer that helps create a unique UID.

time

long time
Long used to record the time. The time will be used to create a unique UID.

count

short count
Short used to create a hash key for this UID.

Class java.rmi.server.UnicastRemoteObject implements Serializable

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Re-export the remote object when it is deserialized.
Serialized Fields

port

int port
port number on which to export object

csf

RMIClientSocketFactory csf
client-side socket factory (if any)

ssf

RMIServerSocketFactory ssf
server-side socket factory (if any) to use when exporting object


J2ME RMI Optional Package

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 66 specification.