javax.management.remote.rmi

Class RMIServerImpl

    • Constructor Detail
      • RMIServerImpl
        public RMIServerImpl(Map<String,?> env)

        Constructs a new RMIServerImpl.

        Parameters:
        env - the environment containing attributes for the new RMIServerImpl. Can be null, which is equivalent to an empty Map.
    • Method Detail
      • export
        protected abstract void export()
                                throws IOException

        Exports this RMI object.

        Throws:
        IOException - if this RMI object cannot be exported.
      • toStub
        public abstract Remote toStub()
                               throws IOException
        Returns a remotable stub for this server object.
        Returns:
        a remotable stub.
        Throws:
        IOException - if the stub cannot be obtained - e.g the RMIServerImpl has not been exported yet.
      • setDefaultClassLoader
        public void setDefaultClassLoader(ClassLoader cl)

        Sets the default ClassLoader for this connector server. New client connections will use this classloader. Existing client connections are unaffected.

        Parameters:
        cl - the new ClassLoader to be used by this connector server.
        See Also:
        getDefaultClassLoader()
      • setMBeanServer
        public void setMBeanServer(MBeanServer mbs)

        Sets the MBeanServer to which this connector server is attached. New client connections will interact with this MBeanServer. Existing client connections are unaffected.

        Parameters:
        mbs - the new MBeanServer. Can be null, but new client connections will be refused as long as it is.
        See Also:
        getMBeanServer()
      • getVersion
        public String getVersion()
        Description copied from interface: RMIServer

        The version of the RMI Connector Protocol understood by this connector server. This is a string with the following format:

         protocol-version implementation-name
         

        The protocol-version is a series of two or more non-negative integers separated by periods (.). An implementation of the version described by this documentation must use the string 1.0 here.

        After the protocol version there must be a space, followed by the implementation name. The format of the implementation name is unspecified. It is recommended that it include an implementation version number. An implementation can use an empty string as its implementation name, for example for security reasons.

        Specified by:
        getVersion in interface RMIServer
        Returns:
        a string with the format described here.
      • newClient
        public RMIConnection newClient(Object credentials)
                                throws IOException

        Creates a new client connection. This method calls makeClient and adds the returned client connection object to an internal list. When this RMIServerImpl is shut down via its close() method, the close() method of each object remaining in the list is called.

        The fact that a client connection object is in this internal list does not prevent it from being garbage collected.

        Specified by:
        newClient in interface RMIServer
        Parameters:
        credentials - this object specifies the user-defined credentials to be passed in to the server in order to authenticate the caller before creating the RMIConnection. Can be null.
        Returns:
        the newly-created RMIConnection. This is usually the object created by makeClient, though an implementation may choose to wrap that object in another object implementing RMIConnection.
        Throws:
        IOException - if the new client object cannot be created or exported.
        SecurityException - if the given credentials do not allow the server to authenticate the user successfully.
        IllegalStateException - if getMBeanServer() is null.
      • makeClient
        protected abstract RMIConnection makeClient(String connectionId,
                               Subject subject)
                                             throws IOException

        Creates a new client connection. This method is called by the public method newClient(Object).

        Parameters:
        connectionId - the ID of the new connection. Every connection opened by this connector server will have a different ID. The behavior is unspecified if this parameter is null.
        subject - the authenticated subject. Can be null.
        Returns:
        the newly-created RMIConnection.
        Throws:
        IOException - if the new client object cannot be created or exported.
      • closeClient
        protected abstract void closeClient(RMIConnection client)
                                     throws IOException

        Closes a client connection made by makeClient.

        Parameters:
        client - a connection previously returned by makeClient on which the closeClient method has not previously been called. The behavior is unspecified if these conditions are violated, including the case where client is null.
        Throws:
        IOException - if the client connection cannot be closed.
      • getProtocol
        protected abstract String getProtocol()

        Returns the protocol string for this object. The string is rmi for RMI/JRMP and iiop for RMI/IIOP.

        Returns:
        the protocol string for this object.
      • clientClosed
        protected void clientClosed(RMIConnection client)
                             throws IOException

        Method called when a client connection created by makeClient is closed. A subclass that defines makeClient must arrange for this method to be called when the resultant object's close method is called. This enables it to be removed from the RMIServerImpl's list of connections. It is not an error for client not to be in that list.

        After removing client from the list of connections, this method calls closeClient(client).

        Parameters:
        client - the client connection that has been closed.
        Throws:
        IOException - if closeClient(javax.management.remote.rmi.RMIConnection) throws this exception.
        NullPointerException - if client is null.
      • close
        public void close()
                   throws IOException

        Closes this connection server. This method first calls the closeServer() method so that no new client connections will be accepted. Then, for each remaining RMIConnection object returned by makeClient, its close method is called.

        The behavior when this method is called more than once is unspecified.

        If closeServer() throws an IOException, the individual connections are nevertheless closed, and then the IOException is thrown from this method.

        If closeServer() returns normally but one or more of the individual connections throws an IOException, then, after closing all the connections, one of those IOExceptions is thrown from this method. If more than one connection throws an IOException, it is unspecified which one is thrown from this method.

        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Throws:
        IOException - if closeServer() or one of the RMIConnection.close() calls threw IOException.
      • closeServer
        protected abstract void closeServer()
                                     throws IOException

        Called by close() to close the connector server. After returning from this method, the connector server must not accept any new connections.

        Throws:
        IOException - if the attempt to close the connector server failed.

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/management/remote/rmi/RMIServerImpl.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