Revert one accidental change
This commit is contained in:
parent
c01e02df6f
commit
8065f0f5fc
|
@ -57,12 +57,12 @@ public class SubscriptionInterceptorLoader {
|
|||
if (!supportedSubscriptionTypes.isEmpty()) {
|
||||
loadSubscriptions();
|
||||
ourLog.info("Registering subscription activating interceptor");
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(mySubscriptionActivatingInterceptor);
|
||||
myInterceptorRegistry.registerInterceptor(mySubscriptionActivatingInterceptor);
|
||||
}
|
||||
if (myDaoConfig.isSubscriptionMatchingEnabled()) {
|
||||
mySubscriptionMatcherInterceptor.start();
|
||||
ourLog.info("Registering subscription matcher interceptor");
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(mySubscriptionMatcherInterceptor);
|
||||
myInterceptorRegistry.registerInterceptor(mySubscriptionMatcherInterceptor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ public abstract class BaseJpaR4Test extends BaseJpaTest {
|
|||
myDaoConfig.setInterceptors(myInterceptor);
|
||||
|
||||
myPerformanceTracingLoggingInterceptor = new PerformanceTracingLoggingInterceptor();
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(myPerformanceTracingLoggingInterceptor);
|
||||
myInterceptorRegistry.registerInterceptor(myPerformanceTracingLoggingInterceptor);
|
||||
}
|
||||
|
||||
@Before
|
||||
|
|
|
@ -82,7 +82,7 @@ public class RestHookTestDstu3Test extends BaseResourceProviderDstu3Test {
|
|||
@Before
|
||||
public void beforeRegisterRestHookListener() {
|
||||
mySubscriptionTestUtil.registerRestHookInterceptor();
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(ourSubscriptionDebugLogInterceptor);
|
||||
myInterceptorRegistry.registerInterceptor(ourSubscriptionDebugLogInterceptor);
|
||||
}
|
||||
|
||||
@Before
|
||||
|
|
|
@ -132,7 +132,7 @@ public class RestHookWithInterceptorR4Test extends BaseSubscriptionsR4Test {
|
|||
@Test
|
||||
public void testAttributesAreCopiedAlongPipeline() throws Exception {
|
||||
AttributeCarryingInterceptor interceptor = new AttributeCarryingInterceptor();
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(interceptor);
|
||||
myInterceptorRegistry.registerInterceptor(interceptor);
|
||||
try {
|
||||
|
||||
// Create a subscription
|
||||
|
@ -222,9 +222,9 @@ public class RestHookWithInterceptorR4Test extends BaseSubscriptionsR4Test {
|
|||
}).when(loggerMock).debug(any(), ArgumentMatchers.<Object[]>any());
|
||||
|
||||
SubscriptionDebugLogInterceptor interceptor = new SubscriptionDebugLogInterceptor();
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(interceptor);
|
||||
myInterceptorRegistry.registerInterceptor(interceptor);
|
||||
SubscriptionDebugLogInterceptor interceptor2 = new SubscriptionDebugLogInterceptor(t -> loggerMock, Level.DEBUG);
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(interceptor2);
|
||||
myInterceptorRegistry.registerInterceptor(interceptor2);
|
||||
try {
|
||||
|
||||
String payload = "application/json";
|
||||
|
@ -310,7 +310,7 @@ public class RestHookWithInterceptorR4Test extends BaseSubscriptionsR4Test {
|
|||
@Bean
|
||||
public MyTestInterceptor interceptor() {
|
||||
MyTestInterceptor retVal = new MyTestInterceptor();
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(retVal);
|
||||
myInterceptorRegistry.registerInterceptor(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public interface IInterceptorRegistry {
|
|||
* @param theInterceptor The interceptor to register
|
||||
* @return Returns <code>true</code> if at least one valid hook method was found on this interceptor
|
||||
*/
|
||||
boolean registerAnonymousInterceptor(Object theInterceptor);
|
||||
boolean registerInterceptor(Object theInterceptor);
|
||||
|
||||
/**
|
||||
* Unregister an interceptor. This method has no effect if the given interceptor is not already registered.
|
||||
|
|
|
@ -151,7 +151,7 @@ public class InterceptorService implements IInterceptorRegistry, IInterceptorBro
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean registerAnonymousInterceptor(Object theInterceptor) {
|
||||
public boolean registerInterceptor(Object theInterceptor) {
|
||||
synchronized (myRegistryMutex) {
|
||||
|
||||
if (isInterceptorAlreadyRegistered(theInterceptor)) {
|
||||
|
@ -191,7 +191,7 @@ public class InterceptorService implements IInterceptorRegistry, IInterceptorBro
|
|||
|
||||
@Override
|
||||
public boolean registerGlobalInterceptor(Object theInterceptor) {
|
||||
return registerAnonymousInterceptor(theInterceptor);
|
||||
return registerInterceptor(theInterceptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,7 @@ public class InterceptorServiceTest {
|
|||
int initialSize = myInterceptorRegistry.getGlobalInterceptorsForUnitTest().size();
|
||||
|
||||
try {
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(new InterceptorThatFailsOnRegister());
|
||||
myInterceptorRegistry.registerInterceptor(new InterceptorThatFailsOnRegister());
|
||||
fail();
|
||||
} catch (InternalErrorException e) {
|
||||
// good
|
||||
|
@ -74,7 +74,7 @@ public class InterceptorServiceTest {
|
|||
public void testManuallyRegisterGlobalInterceptor() {
|
||||
|
||||
// Register the manual interceptor (has @Order right in the middle)
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(myInterceptorManual);
|
||||
myInterceptorRegistry.registerInterceptor(myInterceptorManual);
|
||||
List<Object> globalInterceptors = myInterceptorRegistry.getGlobalInterceptorsForUnitTest();
|
||||
assertEquals(3, globalInterceptors.size());
|
||||
assertTrue(globalInterceptors.get(0).getClass().toString(), globalInterceptors.get(0) instanceof MyTestInterceptorOne);
|
||||
|
@ -82,7 +82,7 @@ public class InterceptorServiceTest {
|
|||
assertTrue(globalInterceptors.get(2).getClass().toString(), globalInterceptors.get(2) instanceof MyTestInterceptorTwo);
|
||||
|
||||
// Try to register again (should have no effect
|
||||
myInterceptorRegistry.registerAnonymousInterceptor(myInterceptorManual);
|
||||
myInterceptorRegistry.registerInterceptor(myInterceptorManual);
|
||||
globalInterceptors = myInterceptorRegistry.getGlobalInterceptorsForUnitTest();
|
||||
assertEquals(3, globalInterceptors.size());
|
||||
assertTrue(globalInterceptors.get(0).getClass().toString(), globalInterceptors.get(0) instanceof MyTestInterceptorOne);
|
||||
|
@ -344,7 +344,7 @@ public class InterceptorServiceTest {
|
|||
@Bean
|
||||
public MyTestInterceptorTwo interceptor1() {
|
||||
MyTestInterceptorTwo retVal = new MyTestInterceptorTwo();
|
||||
interceptorService().registerAnonymousInterceptor(retVal);
|
||||
interceptorService().registerInterceptor(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ public class InterceptorServiceTest {
|
|||
@Bean
|
||||
public MyTestInterceptorOne interceptor2() {
|
||||
MyTestInterceptorOne retVal = new MyTestInterceptorOne();
|
||||
interceptorService().registerAnonymousInterceptor(retVal);
|
||||
interceptorService().registerInterceptor(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue