[ 
https://issues.apache.org/jira/browse/WICKET-7080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17776270#comment-17776270
 ] 

ASF GitHub Bot commented on WICKET-7080:
----------------------------------------

reiern70 commented on code in PR #682:
URL: https://github.com/apache/wicket/pull/682#discussion_r1362426474


##########
wicket-core/src/main/java/org/apache/wicket/event/ReflectionEventDispatcher.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.event;
+
+import java.lang.reflect.Method;
+import org.apache.wicket.Component;
+import org.apache.wicket.IEventDispatcher;
+import org.apache.wicket.WicketRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * IEventDispatcher that uses reflection in order to locate events methods.
+ */
+public class ReflectionEventDispatcher implements IEventDispatcher {
+
+       private static final Logger LOGGER = 
LoggerFactory.getLogger(ReflectionEventDispatcher.class);
+
+       /**
+        * If set to true then only sinks annotated with @{@link 
EventAwareObject} will be injected.
+        * Probably, this should be set to true in most applications and 
enforce the use of either @{@link EventAwareObject}
+        * annotation or the marker interface @{@link IEventAwareObject}
+        */
+       private final boolean restrictToEventAware;

Review Comment:
   This flag should make event's processing faster and only marked classes will 
be scanned.





> [Events] make default events delivery machinery pluggable and roll usable 
> annotation based one
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-7080
>                 URL: https://issues.apache.org/jira/browse/WICKET-7080
>             Project: Wicket
>          Issue Type: Improvement
>          Components: events
>            Reporter: Ernesto Reinaldo Barreiro
>            Assignee: Ernesto Reinaldo Barreiro
>            Priority: Major
>             Fix For: 9.16.0, 10.0.0-M3
>
>
> [Events] make default events delivery machinery pluggable and roll usable 
> annotation based one



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to