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

Class RMIConnector

    • Constructor Detail

      • RMIConnector

        public RMIConnector(JMXServiceURL url,
                    Map<String,?> environment)

        Constructs an RMIConnector that will connect the RMI connector server with the given address.

        The address can refer directly to the connector server, using one of the following syntaxes:

         service:jmx:rmi://[host[:port]]/stub/encoded-stub
         service:jmx:iiop://[host[:port]]/ior/encoded-IOR
         

        (Here, the square brackets [] are not part of the address but indicate that the host and port are optional.)

        The address can instead indicate where to find an RMI stub through JNDI, using one of the following syntaxes:

         service:jmx:rmi://[host[:port]]/jndi/jndi-name
         service:jmx:iiop://[host[:port]]/jndi/jndi-name
         

        An implementation may also recognize additional address syntaxes, for example:

         service:jmx:iiop://[host[:port]]/stub/encoded-stub
         
        Parameters:
        url - the address of the RMI connector server.
        environment - additional attributes specifying how to make the connection. For JNDI-based addresses, these attributes can usefully include JNDI attributes recognized by InitialContext. This parameter can be null, which is equivalent to an empty Map.
        Throws:
        IllegalArgumentException - if url is null.
      • RMIConnector

        public RMIConnector(RMIServer rmiServer,
                    Map<String,?> environment)

        Constructs an RMIConnector using the given RMI stub.

        Parameters:
        rmiServer - an RMI stub representing the RMI connector server.
        environment - additional attributes specifying how to make the connection. This parameter can be null, which is equivalent to an empty Map.
        Throws:
        IllegalArgumentException - if rmiServer is null.
    • Method Detail

      • toString

        public String toString()

        Returns a string representation of this object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.

        Overrides:
        toString in class Object
        Returns:
        a String representation of this object.
      • getAddress

        public JMXServiceURL getAddress()

        The address of this connector.

        Specified by:
        getAddress in interface JMXAddressable
        Returns:
        the address of this connector, or null if it does not have one.
        Since:
        1.6
      • connect

        public void connect()
                     throws IOException
        Description copied from interface: JMXConnector

        Establishes the connection to the connector server. This method is equivalent to connect(null).

        Specified by:
        connect in interface JMXConnector
        Throws:
        IOException - if the connection could not be made because of a communication problem, or in the case of the iiop protocol, that RMI/IIOP is not supported
      • connect

        public void connect(Map<String,?> environment)
                     throws IOException
        Description copied from interface: JMXConnector

        Establishes the connection to the connector server.

        If connect has already been called successfully on this object, calling it again has no effect. If, however, JMXConnector.close() was called after connect, the new connect will throw an IOException.

        Otherwise, either connect has never been called on this object, or it has been called but produced an exception. Then calling connect will attempt to establish a connection to the connector server.

        Specified by:
        connect in interface JMXConnector
        Parameters:
        environment - the properties of the connection. Properties in this map override properties in the map specified when the JMXConnector was created, if any. This parameter can be null, which is equivalent to an empty map.
        Throws:
        IOException - if the connection could not be made because of a communication problem, or in the case of the iiop protocol, that RMI/IIOP is not supported
      • getConnectionId

        public String getConnectionId()
                               throws IOException
        Description copied from interface: JMXConnector

        Gets this connection's ID from the connector server. For a given connector server, every connection will have a unique id which does not change during the lifetime of the connection.

        Specified by:
        getConnectionId in interface JMXConnector
        Returns:
        the unique ID of this connection. This is the same as the ID that the connector server includes in its JMXConnectionNotifications. The package description describes the conventions for connection IDs.
        Throws:
        IOException - if the connection ID cannot be obtained, for instance because the connection is closed or broken.
      • getMBeanServerConnection

        public MBeanServerConnection getMBeanServerConnection()
                                                       throws IOException
        Description copied from interface: JMXConnector

        Returns an MBeanServerConnection object representing a remote MBean server. For a given JMXConnector, two successful calls to this method will usually return the same MBeanServerConnection object, though this is not required.

        For each method in the returned MBeanServerConnection, calling the method causes the corresponding method to be called in the remote MBean server. The value returned by the MBean server method is the value returned to the client. If the MBean server method produces an Exception, the same Exception is seen by the client. If the MBean server method, or the attempt to call it, produces an Error, the Error is wrapped in a JMXServerErrorException, which is seen by the client.

        Calling this method is equivalent to calling getMBeanServerConnection(null) meaning that no delegation subject is specified and that all the operations called on the MBeanServerConnection must use the authenticated subject, if any.

        Specified by:
        getMBeanServerConnection in interface JMXConnector
        Returns:
        an object that implements the MBeanServerConnection interface by forwarding its methods to the remote MBean server.
        Throws:
        IOException - if a valid MBeanServerConnection cannot be created, for instance because the connection to the remote MBean server has not yet been established (with the connect method), or it has been closed, or it has broken.
      • getMBeanServerConnection

        public MBeanServerConnection getMBeanServerConnection(Subject delegationSubject)
                                                       throws IOException
        Description copied from interface: JMXConnector

        Returns an MBeanServerConnection object representing a remote MBean server on which operations are performed on behalf of the supplied delegation subject. For a given JMXConnector and Subject, two successful calls to this method will usually return the same MBeanServerConnection object, though this is not required.

        For each method in the returned MBeanServerConnection, calling the method causes the corresponding method to be called in the remote MBean server on behalf of the given delegation subject instead of the authenticated subject. The value returned by the MBean server method is the value returned to the client. If the MBean server method produces an Exception, the same Exception is seen by the client. If the MBean server method, or the attempt to call it, produces an Error, the Error is wrapped in a JMXServerErrorException, which is seen by the client.

        Specified by:
        getMBeanServerConnection in interface JMXConnector
        Parameters:
        delegationSubject - the Subject on behalf of which requests will be performed. Can be null, in which case requests will be performed on behalf of the authenticated Subject, if any.
        Returns:
        an object that implements the MBeanServerConnection interface by forwarding its methods to the remote MBean server on behalf of a given delegation subject.
        Throws:
        IOException - if a valid MBeanServerConnection cannot be created, for instance because the connection to the remote MBean server has not yet been established (with the connect method), or it has been closed, or it has broken.
      • close

        public void close()
                   throws IOException
        Description copied from interface: JMXConnector

        Closes the client connection to its server. Any ongoing or new request using the MBeanServerConnection returned by JMXConnector.getMBeanServerConnection() will get an IOException.

        If close has already been called successfully on this object, calling it again has no effect. If close has never been called, or if it was called but produced an exception, an attempt will be made to close the connection. This attempt can succeed, in which case close will return normally, or it can generate an exception.

        Closing a connection is a potentially slow operation. For example, if the server has crashed, the close operation might have to wait for a network protocol timeout. Callers that do not want to block in a close operation should do it in a separate thread.

        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface JMXConnector
        Throws:
        IOException - if the connection cannot be closed cleanly. If this exception is thrown, it is not known whether the server end of the connection has been cleanly closed.

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