1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.shiro.config.event;
20
21 public abstract class BeanListenerSupport implements BeanListener {
22 public void onBeanEvent(final BeanEvent beanEvent) {
23 if (beanEvent instanceof InstantiatedBeanEvent) {
24 this.onInstantiatedBeanEvent((InstantiatedBeanEvent) beanEvent);
25 } else if (beanEvent instanceof ConfiguredBeanEvent) {
26 this.onConfiguredBeanEvent((ConfiguredBeanEvent) beanEvent);
27 } else if (beanEvent instanceof DestroyedBeanEvent) {
28 this.onDestroyedBeanEvent((DestroyedBeanEvent) beanEvent);
29 } else {
30 this.onUnhandledBeanEvent(beanEvent);
31 }
32 }
33
34 protected void onUnhandledBeanEvent(final BeanEvent beanEvent) {
35
36 }
37
38 protected void onInstantiatedBeanEvent(final InstantiatedBeanEvent beanEvent) {
39
40 }
41
42 protected void onConfiguredBeanEvent(final ConfiguredBeanEvent beanEvent) {
43
44 }
45
46 protected void onDestroyedBeanEvent(final DestroyedBeanEvent beanEvent) {
47
48 }
49 }