Class RemoteEntityBridge


  • public class RemoteEntityBridge
    extends java.lang.Object
    Attempts to locate an entity guid string from a remote MBean. This guid can be used to link jfr daemon data to an external entity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.util.Optional<java.lang.String>> fetchRemoteEntityIdAsync​(javax.management.MBeanServerConnection connection)
      Asynchronously fetch the remote entity id using the connection.
      java.util.Optional<java.lang.String> getRemoteEntityName​(javax.management.MBeanServerConnection connection)
      Get the entity.name attribute from the remote agent's linking metadata.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RemoteEntityBridge

        public RemoteEntityBridge()
    • Method Detail

      • fetchRemoteEntityIdAsync

        public java.util.concurrent.CompletableFuture<java.util.Optional<java.lang.String>> fetchRemoteEntityIdAsync​(javax.management.MBeanServerConnection connection)
        Asynchronously fetch the remote entity id using the connection. If no remote agent is detected, returns empty. If a remote agent is available, it periodically check if the LinkingMetadata MBean is available. When it becomes available, it will return the AttributeNames.ENTITY_GUID property.
        Parameters:
        connection - the connection to the remote server
        Returns:
        a completable future resolving the remote entity id
      • getRemoteEntityName

        public java.util.Optional<java.lang.String> getRemoteEntityName​(javax.management.MBeanServerConnection connection)
        Get the entity.name attribute from the remote agent's linking metadata. This method is only called after establishing that the remote agent's linking metadata exists by first retrieving the entity.guid attribute.
        Parameters:
        connection - MBeanServerConnection
        Returns:
        an Optional that may contain the remote agent's entity.name attribute