Package com.sun.javacard.rmiclientlib
Class JCRemoteRefImpl
- java.lang.Object
-
- com.sun.javacard.rmiclientlib.JCRemoteRefImpl
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,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 theRemoteRef
interface. It is used in conjunction with Java RMIC generated stubs or dynamically generated proxies for Java Card RMI method invocations.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JCRemoteRefImpl(short objID, java.lang.String a_string, CardAccessor ca, CardObjectFactory cOF)
Creates newJCRemoteRefImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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)
Dynamically generated proxies are using this method.java.lang.Object
invoke(java.rmi.Remote remote, java.lang.reflect.Method method, java.lang.Object[] params, long unused)
Rmic-generated stubs are using this methodvoid
invoke(java.rmi.server.RemoteCall remoteCall)
Deprecated.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.
-
-
-
Constructor Detail
-
JCRemoteRefImpl
public JCRemoteRefImpl(short objID, java.lang.String a_string, CardAccessor ca, CardObjectFactory cOF)
Creates newJCRemoteRefImpl
- Parameters:
objID
- 2 byte Object ID from card remote reference descriptora_string
- Anticollision string for the class of the remote objectca
-CardAccessor
cOF
-CardObjectFactory
-
-
Method Detail
-
getRefClass
public java.lang.String getRefClass(java.io.ObjectOutput objectOutput)
Unsupported operation.- Specified by:
getRefClass
in interfacejava.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
Rmic-generated stubs are using this method- Specified by:
invoke
in interfacejava.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 interfacejava.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 interfacejava.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 interfacejava.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 interfacejava.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 interfacejava.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 interfacejava.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 interfacejava.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 interfacejava.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
Dynamically generated proxies are using this method.- Specified by:
invoke
in interfacejava.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.
-
-