Skip to content

Commit

Permalink
baseline 5-24
Browse files Browse the repository at this point in the history
  • Loading branch information
dhilpipre committed May 24, 2024
1 parent f408979 commit f73f30b
Show file tree
Hide file tree
Showing 14 changed files with 1,064 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.newrelic.instrumentation.mule.http.connector;

import com.newrelic.agent.instrumentation.classmatchers.ClassAndMethodMatcher;
import com.newrelic.agent.instrumentation.classmatchers.ClassMatcher;
import com.newrelic.agent.instrumentation.classmatchers.ExactClassMatcher;
import com.newrelic.agent.instrumentation.methodmatchers.MethodMatcher;

public class HttpListenerClassMethodMatcher implements ClassAndMethodMatcher {

protected static final String HTTPLISTENER = "org.mule.extension.http.internal.listener.HttpListener";

private HttpListenerMethodMatcher methodMatcher;
private ExactClassMatcher classMatcher;

public HttpListenerClassMethodMatcher() {
classMatcher = new ExactClassMatcher(HTTPLISTENER);
methodMatcher = new HttpListenerMethodMatcher();
}

@Override
public ClassMatcher getClassMatcher() {
return classMatcher;
}

@Override
public MethodMatcher getMethodMatcher() {
return methodMatcher;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.newrelic.instrumentation.mule.http.connector;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import com.newrelic.agent.deps.org.objectweb.asm.commons.Method;
import com.newrelic.agent.instrumentation.methodmatchers.MethodMatcher;

public class HttpListenerMethodMatcher implements MethodMatcher {

List<String> methods = new ArrayList<String>();

public HttpListenerMethodMatcher() {
methods.add("onError");
methods.add("onSuccess");
methods.add("onStart");
}

@Override
public boolean matches(int access, String name, String desc, Set<String> annotations) {
return methods.contains(name);
}

@Override
public Method[] getExactMethods() {
// TODO Auto-generated method stub
return null;
}

}
Loading

0 comments on commit f73f30b

Please sign in to comment.