use of org.apache.shenyu.plugin.base.handler.PluginDataHandler in project incubator-shenyu by apache.
the class CommonPluginDataSubscriber method putExtendPluginDataHandler.
/**
* Put extend plugin data handler.
*
* @param handlers the handlers
*/
public void putExtendPluginDataHandler(final List<PluginDataHandler> handlers) {
if (CollectionUtils.isEmpty(handlers)) {
return;
}
for (PluginDataHandler handler : handlers) {
String pluginNamed = handler.pluginNamed();
handlerMap.computeIfAbsent(pluginNamed, name -> {
LOG.info("shenyu auto add extends plugin data handler name is :{}", pluginNamed);
return handler;
});
}
}
use of org.apache.shenyu.plugin.base.handler.PluginDataHandler in project incubator-shenyu by apache.
the class GrpcPluginConfigurationTest method testGrpcPluginDataHandler.
@Test
public void testGrpcPluginDataHandler() {
applicationContextRunner.run(context -> {
PluginDataHandler handler = context.getBean("grpcPluginDataHandler", PluginDataHandler.class);
assertNotNull(handler);
});
}
use of org.apache.shenyu.plugin.base.handler.PluginDataHandler in project incubator-shenyu by apache.
the class HystrixPluginConfigurationTest method testHystrixPluginDataHandler.
@Test
public void testHystrixPluginDataHandler() {
new ApplicationContextRunner().withConfiguration(AutoConfigurations.of(HystrixPluginConfiguration.class)).withBean(HystrixPluginConfigurationTest.class).withPropertyValues("debug=true").run(context -> {
PluginDataHandler handler = context.getBean("hystrixPluginDataHandler", PluginDataHandler.class);
assertNotNull(handler);
});
}
use of org.apache.shenyu.plugin.base.handler.PluginDataHandler in project incubator-shenyu by apache.
the class JwtPluginConfigurationTest method testJwtPluginDataHandler.
@Test
public void testJwtPluginDataHandler() {
new ApplicationContextRunner().withConfiguration(AutoConfigurations.of(JwtPluginConfiguration.class)).withBean(JwtPluginConfigurationTest.class).withPropertyValues("debug=true").run(context -> {
PluginDataHandler handler = context.getBean("jwtPluginDataHandler", PluginDataHandler.class);
assertNotNull(handler);
});
}
use of org.apache.shenyu.plugin.base.handler.PluginDataHandler in project incubator-shenyu by apache.
the class ModifyResponsePluginConfigurationTest method testModifyResponsePluginDataHandler.
@Test
public void testModifyResponsePluginDataHandler() {
new ApplicationContextRunner().withConfiguration(AutoConfigurations.of(ModifyResponsePluginConfiguration.class)).withBean(ModifyResponsePluginConfigurationTest.class).withPropertyValues("debug=true").run(context -> {
assertThat(context).hasSingleBean(ModifyResponsePluginDataHandler.class);
PluginDataHandler handler = context.getBean("modifyResponsePluginDataHandler", PluginDataHandler.class);
assertNotNull(handler);
});
}
Aggregations