Package ca.uhn.fhir.interceptor.api
Interface IBaseInterceptorService<POINTCUT extends IPointcut>
- All Superinterfaces:
IBaseInterceptorBroadcaster<POINTCUT>
- All Known Subinterfaces:
IInterceptorService
- All Known Implementing Classes:
BaseInterceptorService
,InterceptorService
public interface IBaseInterceptorService<POINTCUT extends IPointcut>
extends IBaseInterceptorBroadcaster<POINTCUT>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.uhn.fhir.interceptor.api.IBaseInterceptorBroadcaster
IBaseInterceptorBroadcaster.IInvoker
-
Method Summary
Modifier and TypeMethodDescriptionReturns all currently registered interceptors (excluding any thread local interceptors).boolean
registerInterceptor
(Object theInterceptor) Register an interceptor.void
registerInterceptors
(Collection<?> theInterceptors) void
Unregisters all anonymous interceptors (i.e.void
Unregisters all registered interceptors.boolean
unregisterInterceptor
(Object theInterceptor) Unregister an interceptor.void
unregisterInterceptors
(Collection<?> theInterceptors) void
unregisterInterceptorsIf
(Predicate<Object> theShouldUnregisterFunction) Unregisters all interceptors that are indicated by the given callback function returningtrue
Methods inherited from interface ca.uhn.fhir.interceptor.api.IBaseInterceptorBroadcaster
callHooks, callHooksAndReturnObject, getInvokersForPointcut, hasHooks, ifHasCallHooks, ifHasCallHooksAndReturnObject
-
Method Details
-
registerInterceptor
Register an interceptor. This method has no effect if the given interceptor is already registered.- Parameters:
theInterceptor
- The interceptor to register- Returns:
- Returns
true
if at least one valid hook method was found on this interceptor
-
unregisterInterceptor
Unregister an interceptor. This method has no effect if the given interceptor is not already registered.- Parameters:
theInterceptor
- The interceptor to unregister- Returns:
- Returns
true
if the interceptor was found and removed
-
getAllRegisteredInterceptors
Returns all currently registered interceptors (excluding any thread local interceptors). -
unregisterAllInterceptors
void unregisterAllInterceptors()Unregisters all registered interceptors. -
unregisterInterceptors
-
registerInterceptors
-
unregisterInterceptorsIf
Unregisters all interceptors that are indicated by the given callback function returningtrue
-
unregisterAllAnonymousInterceptors
Unregisters all anonymous interceptors (i.e. all interceptors registered withregisterAnonymousInterceptor
)
-