File tree Expand file tree Collapse file tree 3 files changed +8
-33
lines changed
core/src/main/java/io/temporal/samples
excludefrominterceptor/interceptor Expand file tree Collapse file tree 3 files changed +8
-33
lines changed Original file line number Diff line number Diff line change 2020package io .temporal .samples .countinterceptor ;
2121
2222import io .nexusrpc .handler .OperationContext ;
23- import io .temporal .common .interceptors .ActivityInboundCallsInterceptor ;
24- import io .temporal .common .interceptors .NexusOperationInboundCallsInterceptor ;
25- import io .temporal .common .interceptors .WorkerInterceptor ;
26- import io .temporal .common .interceptors .WorkflowInboundCallsInterceptor ;
23+ import io .temporal .common .interceptors .*;
24+ import io .temporal .internal .sync .BaseRootWorkflowInboundCallsInterceptor ;
2725
28- public class SimpleCountWorkerInterceptor implements WorkerInterceptor {
26+ public class SimpleCountWorkerInterceptor extends WorkerInterceptorBase {
2927
3028 @ Override
3129 public WorkflowInboundCallsInterceptor interceptWorkflow (WorkflowInboundCallsInterceptor next ) {
@@ -36,10 +34,4 @@ public WorkflowInboundCallsInterceptor interceptWorkflow(WorkflowInboundCallsInt
3634 public ActivityInboundCallsInterceptor interceptActivity (ActivityInboundCallsInterceptor next ) {
3735 return new SimpleCountActivityInboundCallsInterceptor (next );
3836 }
39-
40- @ Override
41- public NexusOperationInboundCallsInterceptor interceptNexusOperation (
42- OperationContext context , NexusOperationInboundCallsInterceptor next ) {
43- return next ;
44- }
4537}
Original file line number Diff line number Diff line change 2020package io .temporal .samples .excludefrominterceptor .interceptor ;
2121
2222import io .nexusrpc .handler .OperationContext ;
23- import io .temporal .common .interceptors .ActivityInboundCallsInterceptor ;
24- import io .temporal .common .interceptors .NexusOperationInboundCallsInterceptor ;
25- import io .temporal .common .interceptors .WorkerInterceptor ;
26- import io .temporal .common .interceptors .WorkflowInboundCallsInterceptor ;
23+ import io .temporal .common .interceptors .*;
24+
2725import java .util .ArrayList ;
2826import java .util .List ;
2927
30- public class MyWorkerInterceptor implements WorkerInterceptor {
28+ public class MyWorkerInterceptor extends WorkerInterceptorBase {
3129 private List <String > excludeWorkflowTypes = new ArrayList <>();
3230 private List <String > excludeActivityTypes = new ArrayList <>();
3331
@@ -51,10 +49,4 @@ public WorkflowInboundCallsInterceptor interceptWorkflow(WorkflowInboundCallsInt
5149 public ActivityInboundCallsInterceptor interceptActivity (ActivityInboundCallsInterceptor next ) {
5250 return new MyActivityInboundCallsInterceptor (excludeActivityTypes , next );
5351 }
54-
55- @ Override
56- public NexusOperationInboundCallsInterceptor interceptNexusOperation (
57- OperationContext context , NexusOperationInboundCallsInterceptor next ) {
58- return next ;
59- }
6052}
Original file line number Diff line number Diff line change 2020package io .temporal .samples .retryonsignalinterceptor ;
2121
2222import io .nexusrpc .handler .OperationContext ;
23- import io .temporal .common .interceptors .ActivityInboundCallsInterceptor ;
24- import io .temporal .common .interceptors .NexusOperationInboundCallsInterceptor ;
25- import io .temporal .common .interceptors .WorkerInterceptor ;
26- import io .temporal .common .interceptors .WorkflowInboundCallsInterceptor ;
23+ import io .temporal .common .interceptors .*;
2724
2825/** Should be registered through WorkerFactoryOptions. */
29- public class RetryOnSignalWorkerInterceptor implements WorkerInterceptor {
26+ public class RetryOnSignalWorkerInterceptor extends WorkerInterceptorBase {
3027 @ Override
3128 public WorkflowInboundCallsInterceptor interceptWorkflow (WorkflowInboundCallsInterceptor next ) {
3229 return new RetryOnSignalWorkflowInboundCallsInterceptor (next );
@@ -36,10 +33,4 @@ public WorkflowInboundCallsInterceptor interceptWorkflow(WorkflowInboundCallsInt
3633 public ActivityInboundCallsInterceptor interceptActivity (ActivityInboundCallsInterceptor next ) {
3734 return next ;
3835 }
39-
40- @ Override
41- public NexusOperationInboundCallsInterceptor interceptNexusOperation (
42- OperationContext context , NexusOperationInboundCallsInterceptor next ) {
43- return next ;
44- }
4536}
You can’t perform that action at this time.
0 commit comments