com.sun.javacard.rmiclientlib
Class JCRemoteRefImpl

java.lang.Object
extended by com.sun.javacard.rmiclientlib.JCRemoteRefImpl
All Implemented Interfaces:
java.io.Externalizable, java.lang.reflect.InvocationHandler, java.rmi.server.RemoteRef

public class JCRemoteRefImpl
extends java.lang.Object
implements java.rmi.server.RemoteRef, java.lang.reflect.InvocationHandler

Represents a reference to a card object. This class is a Java Card RMI implementation of the RemoteRef interface. It is used in conjunction with Java RMIC generated stubs or dynamically generated proxies for Java Card RMI method invocations.

See Also:


Field Summary
 
Fields inherited from interface java.rmi.server.RemoteRef
packagePrefix, serialVersionUID
 
Constructor Summary
JCRemoteRefImpl(short objID, java.lang.String a_string, CardAccessor ca, com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory cOF)
          Creates new JCRemoteRefImpl
 
Method Summary
 void done(java.rmi.server.RemoteCall remoteCall)
          Deprecated.  
 java.lang.String getRefClass(java.io.ObjectOutput objectOutput)
          Unsupported operation.
 java.lang.Object invoke(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] params)
          This method is used by dynamically generated proxies.
 void invoke(java.rmi.server.RemoteCall remoteCall)
          Deprecated.  
 java.lang.Object invoke(java.rmi.Remote remote, java.lang.reflect.Method method, java.lang.Object[] params, long unused)
          This method is used by rmic-generated stubs.
 java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject remoteObject, java.rmi.server.Operation[] operation, int param, long param3)
          Deprecated.  
 void readExternal(java.io.ObjectInput objectInput)
          Unsupported operation.
 boolean remoteEquals(java.rmi.server.RemoteRef remoteRef)
          Compares two remote objects for being identical.
 int remoteHashCode()
          Unsupported operation.
 java.lang.String remoteToString()
          String representation of remote object.
 void writeExternal(java.io.ObjectOutput objectOutput)
          Unsupported operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCRemoteRefImpl

public JCRemoteRefImpl(short objID,
java.lang.String a_string,
CardAccessor ca,
com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory cOF)
Creates new JCRemoteRefImpl

Parameters:
objID - 2 byte Object ID from card remote reference descriptor
a_string - Anticollision string for the class of the remote object
cA - CardAccessor
cOF - CardObjectFactory
Method Detail

getRefClass

public java.lang.String getRefClass(java.io.ObjectOutput objectOutput)
Unsupported operation.

Specified by:
getRefClass in interface java.rmi.server.RemoteRef
Parameters:
objectOutput -

invoke

public java.lang.Object invoke(java.rmi.Remote remote,
java.lang.reflect.Method method,
java.lang.Object[] params,
long unused)
throws java.io.IOException,
java.rmi.RemoteException,
java.lang.Exception
This method is used by rmic-generated stubs.

Specified by:
invoke in interface java.rmi.server.RemoteRef
Parameters:
remote - Reference to the stub - not used.
method - java.reflect.Method object containing information about the method to be invoked.
params - Array of parameters. Primitives are wrapped.
unused - rmic-generated hash of the method. Not used.
Returns:
The result returned from the card.
Throws:
java.io.IOException - If a communication error occured.
java.rmi.RemoteException - If an RMI error occured.
java.lang.Exception - Exception corresponding to the one that was thrown on the card.

remoteHashCode

public int remoteHashCode()
Unsupported operation.

Specified by:
remoteHashCode in interface java.rmi.server.RemoteRef
Returns:
A number which is the same for all objects.

remoteToString

public java.lang.String remoteToString()
String representation of remote object.

Specified by:
remoteToString in interface java.rmi.server.RemoteRef
Returns:
A String representation of the remote object.

readExternal

public void readExternal(java.io.ObjectInput objectInput)
throws java.io.IOException,
java.lang.ClassNotFoundException
Unsupported operation.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
objectInput -
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput objectOutput)
throws java.io.IOException
Unsupported operation.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
objectOutput -
Throws:
java.io.IOException

newCall

public java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject remoteObject,
java.rmi.server.Operation[] operation,
int param,
long param3)
throws java.rmi.RemoteException
Deprecated. 

Deprecated and not implemented

Specified by:
newCall in interface java.rmi.server.RemoteRef
Parameters:
remoteObject -
operation -
param -
param3 -
Throws:
java.rmi.RemoteException

invoke

public void invoke(java.rmi.server.RemoteCall remoteCall)
throws java.lang.Exception
Deprecated. 

Deprecated and not implemented

Specified by:
invoke in interface java.rmi.server.RemoteRef
Parameters:
remoteCall -
Throws:
java.lang.Exception

remoteEquals

public boolean remoteEquals(java.rmi.server.RemoteRef remoteRef)
Compares two remote objects for being identical.

Specified by:
remoteEquals in interface java.rmi.server.RemoteRef
Parameters:
remoteRef - RemoteRef to the other remote object.
Returns:
true if corresponding remote objects are identical.

done

public void done(java.rmi.server.RemoteCall remoteCall)
throws java.rmi.RemoteException
Deprecated. 

Deprecated and not implemented

Specified by:
done in interface java.rmi.server.RemoteRef
Parameters:
remoteCall -
Throws:
java.rmi.RemoteException

invoke

public java.lang.Object invoke(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] params)
throws java.io.IOException,
java.rmi.RemoteException,
java.lang.Throwable
This method is used by dynamically generated proxies.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
obj - The reference to the Proxy - not used.
method - Method object containing information about the method.
params - Array of parameters for the method.
Returns:
The result returned from the card.
Throws:
java.io.IOException - If a communication error occured.
java.rmi.RemoteException - If an RMI error occured.
java.lang.Throwable - Exception corresponding to the one that was thrown on the card.