Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
java.rmi.server

Class RemoteObjectInvocationHandler

  • All Implemented Interfaces:
    Serializable, InvocationHandler, Remote

    public class RemoteObjectInvocationHandler
    extends RemoteObject
    implements InvocationHandler
    An implementation of the InvocationHandler interface for use with Java Remote Method Invocation (Java RMI). This invocation handler can be used in conjunction with a dynamic proxy instance as a replacement for a pregenerated stub class.

    Applications are not expected to use this class directly. A remote object exported to use a dynamic proxy with UnicastRemoteObject or Activatable has an instance of this class as that proxy's invocation handler.

    Since:
    1.5
    See Also:
    Serialized Form
    • Constructor Detail

      • RemoteObjectInvocationHandler

        public RemoteObjectInvocationHandler(RemoteRef ref)
        Creates a new RemoteObjectInvocationHandler constructed with the specified RemoteRef.
        Parameters:
        ref - the remote ref
        Throws:
        NullPointerException - if ref is null
    • Method Detail

      • invoke

        public Object invoke(Object proxy,
                    Method method,
                    Object[] args)
                      throws Throwable
        Processes a method invocation made on the encapsulating proxy instance, proxy, and returns the result.

        RemoteObjectInvocationHandler implements this method as follows:

        If method is one of the following methods, it is processed as described below:

        • Object.hashCode: Returns the hash code value for the proxy.
        • Object.equals: Returns true if the argument (args[0]) is an instance of a dynamic proxy class and this invocation handler is equal to the invocation handler of that argument, and returns false otherwise.
        • Object.toString: Returns a string representation of the proxy.

        Otherwise, a remote call is made as follows:

        • If proxy is not an instance of the interface Remote, then an IllegalArgumentException is thrown.
        • Otherwise, the invoke method is invoked on this invocation handler's RemoteRef, passing proxy, method, args, and the method hash (defined in section 8.3 of the "Java Remote Method Invocation (RMI) Specification") for method, and the result is returned.
        • If an exception is thrown by RemoteRef.invoke and that exception is a checked exception that is not assignable to any exception in the throws clause of the method implemented by the proxy's class, then that exception is wrapped in an UnexpectedException and the wrapped exception is thrown. Otherwise, the exception thrown by invoke is thrown by this method.

        The semantics of this method are unspecified if the arguments could not have been produced by an instance of some valid dynamic proxy class containing this invocation handler.

        Specified by:
        invoke in interface InvocationHandler
        Parameters:
        proxy - the proxy instance that the method was invoked on
        method - the Method instance corresponding to the interface method invoked on the proxy instance
        args - an array of objects containing the values of the arguments passed in the method invocation on the proxy instance, or null if the method takes no arguments
        Returns:
        the value to return from the method invocation on the proxy instance
        Throws:
        Throwable - the exception to throw from the method invocation on the proxy instance
        See Also:
        UndeclaredThrowableException

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/remoteobjectinvocationhandler.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