generated from newrelic-experimental/java-instrumentation-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,064 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...java/com/newrelic/instrumentation/mule/http/connector/HttpListenerClassMethodMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
...main/java/com/newrelic/instrumentation/mule/http/connector/HttpListenerMethodMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
Oops, something went wrong.