Class 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 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:
    Serialized Form
    • Field Summary

      • Fields inherited from interface java.rmi.server.RemoteRef

        packagePrefix, serialVersionUID
    • 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 method
      void 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.
      • 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,
                               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
        Rmic-generated stubs are using this method
        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
        Dynamically generated proxies are using this method.
        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.