Skip to content

Commit

Permalink
chore(jmacagent): update JMC agent-related imports (cryostatio#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Matsuoka authored May 15, 2024
1 parent c347521 commit 4531296
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions src/main/java/io/cryostat/jmcagent/JMCAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import java.util.Map;

import io.cryostat.V2Response;
import io.cryostat.core.agent.AgentJMXHelper;
import io.cryostat.core.agent.AgentJMXHelper.ProbeDefinitionException;
import io.cryostat.core.agent.Event;
import io.cryostat.core.agent.ProbeTemplate;
import io.cryostat.core.jmcagent.Event;
import io.cryostat.core.jmcagent.JMCAgentJMXHelper;
import io.cryostat.core.jmcagent.JMCAgentJMXHelper.ProbeDefinitionException;
import io.cryostat.core.jmcagent.ProbeTemplate;
import io.cryostat.core.sys.FileSystem;
import io.cryostat.targets.Target;
import io.cryostat.targets.TargetConnectionManager;
Expand Down Expand Up @@ -70,7 +70,7 @@ public Response postProbe(@RestPath long id, @RestPath String probeTemplateName)
return connectionManager.executeConnectedTask(
target,
connection -> {
AgentJMXHelper helper = new AgentJMXHelper(connection.getHandle());
JMCAgentJMXHelper helper = new JMCAgentJMXHelper(connection.getHandle());
try {
ProbeTemplate template = new ProbeTemplate();
// Retrieve template and deserialize to validate
Expand Down Expand Up @@ -129,7 +129,8 @@ public Response deleteProbe(@RestPath long id) {
target,
connection -> {
try {
AgentJMXHelper helper = new AgentJMXHelper(connection.getHandle());
JMCAgentJMXHelper helper =
new JMCAgentJMXHelper(connection.getHandle());
// The convention for removing probes in the agent controller mbean is
// to call defineEventProbes with a null argument.
helper.defineEventProbes(null);
Expand Down Expand Up @@ -172,7 +173,7 @@ public V2Response getProbes(@RestPath long id) {
return connectionManager.executeConnectedTask(
target,
connection -> {
AgentJMXHelper helper = new AgentJMXHelper(connection.getHandle());
JMCAgentJMXHelper helper = new JMCAgentJMXHelper(connection.getHandle());
List<Event> result = new ArrayList<>();
String probes = helper.retrieveEventProbes();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import io.cryostat.ConfigProperties;
import io.cryostat.Producers;
import io.cryostat.StorageBuckets;
import io.cryostat.core.agent.ProbeTemplate;
import io.cryostat.core.agent.ProbeTemplateService;
import io.cryostat.core.jmcagent.ProbeTemplate;
import io.cryostat.core.jmcagent.ProbeTemplateService;
import io.cryostat.ws.MessagingServer;
import io.cryostat.ws.Notification;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import java.util.Objects;

import io.cryostat.core.agent.ProbeTemplate;
import io.cryostat.core.jmcagent.ProbeTemplate;

public record SerializableProbeTemplateInfo(String name, String xml) {

Expand Down

0 comments on commit 4531296

Please sign in to comment.