@@ -81,6 +81,7 @@ <h1>Reactive Commons Reference Guide</h1>
8181< li > < a href ="#_handlerregistry_listenevent "> HandlerRegistry - listenEvent</ a > </ li >
8282< li > < a href ="#_handlerregistry_handlecommand "> HandlerRegistry - handleCommand</ a > </ li >
8383< li > < a href ="#_handlerregistry_servequery "> HandlerRegistry - serveQuery</ a > </ li >
84+ < li > < a href ="#_handlerregistry_patterns "> HandlerRegistry - patterns</ a > </ li >
8485</ ul >
8586</ li >
8687</ ul >
@@ -862,6 +863,44 @@ <h5 id="_handlerregistry_servequery">HandlerRegistry - serveQuery</h5>
862863</ div >
863864</ div >
864865</ div >
866+ < div class ="sect4 ">
867+ < h5 id ="_handlerregistry_patterns "> HandlerRegistry - patterns</ h5 >
868+ < div class ="paragraph ">
869+ < p > You can also define some handlers with names that contains a wildcard, which will be useful in some cases, for example you can:</ p >
870+ </ div >
871+ < div class ="listingblock ">
872+ < div class ="content ">
873+ < pre class ="prettyprint highlight "> < code data-lang ="java "> @Configuration
874+ public class SomeConfigurationClass {
875+
876+ @Autowired
877+ private ManageTasksUseCase someBusinessDependency;
878+
879+ @Bean
880+ public HandlerRegistry notificationEvents() {
881+ return HandlerRegistry.register()
882+ .listenNotificationEvent("some.event.name", event -> someBusinessDependency.someFunctionReturningMonoVoid(event), SomeClass.class)
883+ .listenEvent("some.event.name2", event -> someBusinessDependency.functionReturningMonoVoid(event), Some.class)
884+ .serveQuery("*.some.query", query -> someBusinessDependency.findSomething(query), SomeQuery.class)
885+ .handleCommand("command.pattern.*", cmd -> someBusinessDependency.handleCommand(cmd), CmdClass.class);
886+ }
887+ }</ code > </ pre >
888+ </ div >
889+ </ div >
890+ < div class ="admonitionblock tip ">
891+ < table >
892+ < tr >
893+ < td class ="icon ">
894+ < i class ="fa icon-tip " title ="Tip "> </ i >
895+ </ td >
896+ < td class ="content ">
897+ * can be any character sequence, but the fixed words have priority, for example if exists two rules like
898+ "prefix.*" and "*.*" and receives a name like "prefix.name", handler with "prefix.*" will be called.
899+ </ td >
900+ </ tr >
901+ </ table >
902+ </ div >
903+ </ div >
865904</ div >
866905</ div >
867906</ div >
@@ -870,7 +909,7 @@ <h5 id="_handlerregistry_servequery">HandlerRegistry - serveQuery</h5>
870909< div id ="footer ">
871910< div id ="footer-text ">
872911Version 1.0.0-beta10< br >
873- Last updated 2021-09-28 01:24:28 UTC
912+ Last updated 2021-05-21 16:48:51 -0500
874913</ div >
875914</ div >
876915< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css ">
0 commit comments