Navigation Menu

Skip to content

Commit

Permalink
refactoring plugin api
Browse files Browse the repository at this point in the history
 - redefine Interceptor type
  • Loading branch information
emeroad committed Nov 3, 2015
1 parent e9a4ed1 commit 98a4dc3
Show file tree
Hide file tree
Showing 42 changed files with 796 additions and 555 deletions.
Expand Up @@ -48,7 +48,7 @@ public interface InstrumentClass {
ClassLoader getClassLoader();


public boolean isInterceptable();
boolean isInterceptable();

boolean hasConstructor(String... parameterTypes);

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -29,7 +29,7 @@ public static void handleException(Throwable t) {
if (propagateException) {
throw new RuntimeException(t);
} else {
logger.warn("Excetpion occured from interceptor", t);
logger.warn("Exception occurred from interceptor", t);
}
}

Expand Down
Expand Up @@ -19,6 +19,13 @@ public abstract class SpanAsyncEventSimpleAroundInterceptor implements AroundInt
final MethodDescriptor asyncMethodDescriptor = new AsyncMethodDescriptor();

public SpanAsyncEventSimpleAroundInterceptor(TraceContext traceContext, MethodDescriptor methodDescriptor) {
if (traceContext == null) {
throw new NullPointerException("traceContext must not be null");
}
if (methodDescriptor == null) {
throw new NullPointerException("methodDescriptor must not be null");
}

this.traceContext = traceContext;
this.methodDescriptor = methodDescriptor;

Expand Down
Expand Up @@ -35,6 +35,12 @@ public abstract class SpanEventSimpleAroundInterceptorForPlugin implements Aroun
protected final TraceContext traceContext;

protected SpanEventSimpleAroundInterceptorForPlugin(TraceContext traceContext, MethodDescriptor descriptor) {
if (traceContext == null) {
throw new NullPointerException("traceContext must not be null");
}
if (descriptor == null) {
throw new NullPointerException("descriptor must not be null");
}
this.traceContext = traceContext;
this.methodDescriptor = descriptor;
}
Expand Down

0 comments on commit 98a4dc3

Please sign in to comment.