Top Fields Constructors Methods
com.sun.jmx.remote.internal.rmi

public Class ProxyRef

extends Object
implements RemoteRef
Class Inheritance
All Implemented Interfaces
java.rmi.server.RemoteRef, java.io.Externalizable, java.io.Serializable
Annotations
@SuppressWarnings:deprecation, serial
Imports
java.io.IOException, .ObjectInput, .ObjectOutput, java.lang.reflect.Method, java.rmi.Remote, .RemoteException, java.rmi.server.RemoteObject, .RemoteRef

Field Summary

Modifier and TypeField and Description
protected RemoteRef
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
done(RemoteCall
object representing remote call
call
)

Implements java.rmi.server.RemoteRef.done.

Deprecated
Allows the remote reference to clean up (or reuse) the connection.
public String
getRefClass(ObjectOutput
the output stream to which the reference will be serialized
out
)

Implements java.rmi.server.RemoteRef.getRefClass.

Returns the class name of the ref type to be serialized onto the stream 'out'.
public void
invoke(RemoteCall
object representing remote call
call
)

Implements java.rmi.server.RemoteRef.invoke.

Deprecated
Executes the remote call.
public Object
invoke(Remote
the object that contains the RemoteRef (e.g., the RemoteStub for the object.
obj
,
Method
the method to be invoked
method
,
Object[]
the parameter list
params
,
long
a hash that may be used to represent the method
opnum
)

Implements java.rmi.server.RemoteRef.invoke.

Invoke a method.
public RemoteCall
newCall(RemoteObject
remote stub through which to make call
obj
,
Operation[]
array of stub operations
op
,
int
operation number
opnum
,
long
stub/skeleton interface hash
hash
)

Implements java.rmi.server.RemoteRef.newCall.

Deprecated
Creates an appropriate call object for a new remote method invocation on this object.
public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
public boolean
remoteEquals(RemoteRef
the Object to compare with
obj
)

Implements java.rmi.server.RemoteRef.remoteEquals.

Compares two remote objects for equality.
public int
remoteHashCode()

Implements java.rmi.server.RemoteRef.remoteHashCode.

Returns a hashcode for a remote object.
public String
remoteToString()

Implements java.rmi.server.RemoteRef.remoteToString.

Returns a String that represents the reference of this remote object.
public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

refback to summary
protected RemoteRef ref
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.rmi.server.RemoteRef.serialVersionUID.

Constructor Detail

ProxyRefback to summary
public ProxyRef(RemoteRef ref)

Method Detail

doneback to summary
public void done(RemoteCall call) throws RemoteException

Implements java.rmi.server.RemoteRef.done.

Doc from java.rmi.server.RemoteRef.done.

Deprecated

Allows the remote reference to clean up (or reuse) the connection. Done should only be called if the invoke returns successfully (non-exceptionally) to the stub.

Parameters
call:RemoteCall

object representing remote call

Annotations
@Deprecated
Exceptions
RemoteException:
if remote error occurs during call cleanup
getRefClassback to summary
public String getRefClass(ObjectOutput out)

Implements java.rmi.server.RemoteRef.getRefClass.

Doc from java.rmi.server.RemoteRef.getRefClass.

Returns the class name of the ref type to be serialized onto the stream 'out'.

Parameters
out:ObjectOutput

the output stream to which the reference will be serialized

Returns:String

the class name (without package qualification) of the reference type

invokeback to summary
public void invoke(RemoteCall call) throws Exception

Implements java.rmi.server.RemoteRef.invoke.

Doc from java.rmi.server.RemoteRef.invoke.

Deprecated

Executes the remote call. Invoke will raise any "user" exceptions which should pass through and not be caught by the stub. If any exception is raised during the remote invocation, invoke should take care of cleaning up the connection before raising the "user" or remote exception.

Parameters
call:RemoteCall

object representing remote call

Annotations
@Deprecated
Exceptions
Exception:
if any exception occurs during remote method
invokeback to summary
public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception

Implements java.rmi.server.RemoteRef.invoke.

Doc from java.rmi.server.RemoteRef.invoke.

Invoke a method. This form of delegating method invocation to the reference allows the reference to take care of setting up the connection to the remote host, marshaling some representation for the method and parameters, then communicating the method invocation to the remote host. This method either returns the result of a method invocation on the remote object which resides on the remote host or throws a RemoteException if the call failed or an application-level exception if the remote invocation throws an exception.

Parameters
obj:Remote

the object that contains the RemoteRef (e.g., the RemoteStub for the object.

method:Method

the method to be invoked

params:Object[]

the parameter list

opnum:long

a hash that may be used to represent the method

Returns:Object

result of remote method invocation

Exceptions
Exception:
if any exception occurs during remote method invocation
newCallback to summary
public RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash) throws RemoteException

Implements java.rmi.server.RemoteRef.newCall.

Doc from java.rmi.server.RemoteRef.newCall.

Deprecated

Creates an appropriate call object for a new remote method invocation on this object. Passing operation array and index, allows the stubs generator to assign the operation indexes and interpret them. The remote reference may need the operation to encode in the call.

Parameters
obj:RemoteObject

remote stub through which to make call

op:Operation[]

array of stub operations

opnum:int

operation number

hash:long

stub/skeleton interface hash

Returns:RemoteCall

call object representing remote call

Annotations
@Deprecated
Exceptions
RemoteException:
if failed to initiate new remote call
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

the stream to read data from in order to restore the object

Exceptions
IOException:
if I/O errors occur
ClassNotFoundException:
If the class for an object being restored cannot be found.
remoteEqualsback to summary
public boolean remoteEquals(RemoteRef obj)

Implements java.rmi.server.RemoteRef.remoteEquals.

Doc from java.rmi.server.RemoteRef.remoteEquals.

Compares two remote objects for equality. Returns a boolean that indicates whether this remote object is equivalent to the specified Object. This method is used when a remote object is stored in a hashtable.

Parameters
obj:RemoteRef

the Object to compare with

Returns:boolean

true if these Objects are equal; false otherwise.

remoteHashCodeback to summary
public int remoteHashCode()

Implements java.rmi.server.RemoteRef.remoteHashCode.

Doc from java.rmi.server.RemoteRef.remoteHashCode.

Returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code (in order to support remote objects as keys in hash tables).

Returns:int

remote object hashcode

remoteToStringback to summary
public String remoteToString()

Implements java.rmi.server.RemoteRef.remoteToString.

Doc from java.rmi.server.RemoteRef.remoteToString.

Returns a String that represents the reference of this remote object.

Returns:String

string representing remote object reference

writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

the stream to write the object to

Exceptions
IOException:
Includes any I/O exceptions that may occur