Package com.newrelic.jfr.daemon.app
Class RemoteEntityBridge
- java.lang.Object
-
- com.newrelic.jfr.daemon.app.RemoteEntityBridge
-
public class RemoteEntityBridge extends java.lang.ObjectAttempts to locate an entity guid string from a remote MBean. This guid can be used to link jfr daemon data to an external entity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRemoteEntityBridge.LinkingMetadataMBean
-
Constructor Summary
Constructors Constructor Description RemoteEntityBridge()
-
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 theconnection.java.util.Optional<java.lang.String>getRemoteEntityName(javax.management.MBeanServerConnection connection)Get theentity.nameattribute from the remote agent's linking metadata.
-
-
-
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 theconnection. If no remote agent is detected, returns empty. If a remote agent is available, it periodically check if theLinkingMetadataMBean is available. When it becomes available, it will return theAttributeNames.ENTITY_GUIDproperty.- 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 theentity.nameattribute 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 theentity.guidattribute.- Parameters:
connection- MBeanServerConnection- Returns:
- an Optional that may contain the remote agent's
entity.nameattribute
-
-