Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.rmi

Class PortableRemoteObject


  • public class PortableRemoteObject
    extends Object
    Server implementation objects may either inherit from javax.rmi.PortableRemoteObject or they may implement a remote interface and then use the exportObject method to register themselves as a server object. The toStub method takes a server implementation and returns a stub that can be used to access that server object. The connect method makes a Remote object ready for remote communication. The unexportObject method is used to deregister a server object, allowing it to become available for garbage collection. The narrow method takes an object reference or abstract interface type and attempts to narrow it to conform to the given interface. If the operation is successful the result will be an object of the specified type, otherwise an exception will be thrown.
    • Constructor Detail

      • PortableRemoteObject

        protected PortableRemoteObject()
                                throws RemoteException
        Initializes the object by calling exportObject(this).
        Throws:
        RemoteException - if export fails.
    • Method Detail

      • exportObject

        public static void exportObject(Remote obj)
                                 throws RemoteException
        Makes a server object ready to receive remote calls. Note that subclasses of PortableRemoteObject do not need to call this method, as it is called by the constructor.
        Parameters:
        obj - the server object to export.
        Throws:
        RemoteException - if export fails.
      • toStub

        public static Remote toStub(Remote obj)
                             throws NoSuchObjectException
        Returns a stub for the given server object.
        Parameters:
        obj - the server object for which a stub is required. Must either be a subclass of PortableRemoteObject or have been previously the target of a call to exportObject(java.rmi.Remote).
        Returns:
        the most derived stub for the object.
        Throws:
        NoSuchObjectException - if a stub cannot be located for the given server object.
      • unexportObject

        public static void unexportObject(Remote obj)
                                   throws NoSuchObjectException
        Deregisters a server object from the runtime, allowing the object to become available for garbage collection.
        Parameters:
        obj - the object to unexport.
        Throws:
        NoSuchObjectException - if the remote object is not currently exported.
      • narrow

        public static Object narrow(Object narrowFrom,
                    Class narrowTo)
                             throws ClassCastException
        Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.
        Parameters:
        narrowFrom - the object to check.
        narrowTo - the desired type.
        Returns:
        an object which can be cast to the desired type.
        Throws:
        ClassCastException - if narrowFrom cannot be cast to narrowTo.
      • connect

        public static void connect(Remote target,
                   Remote source)
                            throws RemoteException
        Makes a Remote object ready for remote communication. This normally happens implicitly when the object is sent or received as an argument on a remote method call, but in some circumstances it is useful to perform this action by making an explicit call. See the Stub.connect(org.omg.CORBA.ORB) method for more information.
        Parameters:
        target - the object to connect.
        source - a previously connected object.
        Throws:
        RemoteException - if source is not connected or if target is already connected to a different ORB than source.

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/rmi/portableremoteobject.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut