java.rmi.server

Interface RemoteRef

  • All Superinterfaces:
    Externalizable, Serializable
    All Known Subinterfaces:
    ServerRef

    public interface RemoteRef
    extends Externalizable
    RemoteRef represents the handle for a remote object. A RemoteStub uses a remote reference to carry out a remote method invocation to a remote object.
    Since:
    JDK1.1
    See Also:
    RemoteStub
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static String packagePrefix
      Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.
      static long serialVersionUID
      indicate compatibility with JDK 1.1.x version of class.

      Eerste pagina van API Java Inhoudsopgave Haut

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void done(RemoteCall call)
      Deprecated. 
      1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.
      String getRefClass(ObjectOutput out)
      Returns the class name of the ref type to be serialized onto the stream 'out'.
      void invoke(RemoteCall call)
      Deprecated. 
      1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.
      Object invoke(Remote obj, Method method, Object[] params, long opnum)
      Invoke a method.
      RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
      Deprecated. 
      1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.
      boolean remoteEquals(RemoteRef obj)
      Compares two remote objects for equality.
      int remoteHashCode()
      Returns a hashcode for a remote object.
      String remoteToString()
      Returns a String that represents the reference of this remote object.

      Eerste pagina van API Java Inhoudsopgave Haut

    • Field Detail

      • serialVersionUID

        static final long serialVersionUID
        indicate compatibility with JDK 1.1.x version of class.
        See Also:
        Constant Field Values
      • packagePrefix

        static final String packagePrefix
        Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.
        See Also:
        Constant Field Values
    • Method Detail

      • invoke

        Object invoke(Remote obj,
                    Method method,
                    Object[] params,
                    long opnum)
                      throws Exception
        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 - the object that contains the RemoteRef (e.g., the RemoteStub for the object.
        method - the method to be invoked
        params - the parameter list
        opnum - a hash that may be used to represent the method
        Returns:
        result of remote method invocation
        Throws:
        Exception - if any exception occurs during remote method invocation
        Since:
        1.2
      • newCall

        @Deprecated
        RemoteCall newCall(RemoteObject obj,
                                    Operation[] op,
                                    int opnum,
                                    long hash)
                           throws RemoteException
        Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.
        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 - remote stub through which to make call
        op - array of stub operations
        opnum - operation number
        hash - stub/skeleton interface hash
        Returns:
        call object representing remote call
        Throws:
        RemoteException - if failed to initiate new remote call
        Since:
        JDK1.1
        See Also:
        invoke(Remote,java.lang.reflect.Method,Object[],long)
      • invoke

        @Deprecated
        void invoke(RemoteCall call)
                    throws Exception
        Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.
        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 - object representing remote call
        Throws:
        Exception - if any exception occurs during remote method
        Since:
        JDK1.1
        See Also:
        invoke(Remote,java.lang.reflect.Method,Object[],long)
      • done

        @Deprecated
        void done(RemoteCall call)
                  throws RemoteException
        Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.
        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 - object representing remote call
        Throws:
        RemoteException - if remote error occurs during call cleanup
        Since:
        JDK1.1
        See Also:
        invoke(Remote,java.lang.reflect.Method,Object[],long)
      • getRefClass

        String getRefClass(ObjectOutput out)
        Returns the class name of the ref type to be serialized onto the stream 'out'.
        Parameters:
        out - the output stream to which the reference will be serialized
        Returns:
        the class name (without package qualification) of the reference type
        Since:
        JDK1.1
      • remoteHashCode

        int 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:
        remote object hashcode
        Since:
        JDK1.1
        See Also:
        Hashtable
      • remoteEquals

        boolean remoteEquals(RemoteRef obj)
        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 - the Object to compare with
        Returns:
        true if these Objects are equal; false otherwise.
        Since:
        JDK1.1
        See Also:
        Hashtable
      • remoteToString

        String remoteToString()
        Returns a String that represents the reference of this remote object.
        Returns:
        string representing remote object reference
        Since:
        JDK1.1

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-java/rmi/server/remoteref.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut