1 | private class MyAliasesListener implements IObjectCacheChangeListener↵ | | 1 | private class MyDriversListener implements IObjectCacheChangeListener↵
|
2 | {↵ | | 2 | {↵
|
3 | /**↵ | | 3 | /**↵
|
4 | * An alias has been added to the cache.↵ | | 4 | * A driver has been added to the cache.↵
|
5 | *↵ | | 5 | *↵
|
6 | * @param evt Describes the event in the cache.↵ | | 6 | * @param evt Describes the event in the cache.↵
|
7 | */↵ | | 7 | */↵
|
8 | public void objectAdded(ObjectCacheChangeEvent evt)↵ | | 8 | public void objectAdded(ObjectCacheChangeEvent evt)↵
|
9 | {↵ | | 9 | {↵
|
10 | Object obj = evt.getObject();↵ | | 10 | Object obj = evt.getObject();↵
|
11 | if (obj instanceof ISQLAlias)↵ | | 11 | if (obj instanceof ISQLDriver)↵
|
12 | {↵ | | 12 | {↵
|
13 | addAlias((ISQLAlias)obj);↵ | | 13 | addDriver((ISQLDriver)obj);↵
|
14 | }↵ | | 14 | }↵
|
15 | }↵ | | 15 | }↵
|
|
16 | /**↵ | | 16 | /**↵
|
17 | * An alias has been removed from the cache.↵ | | 17 | * A driver has been removed from the cache.↵
|
18 | *↵ | | 18 | *↵
|
19 | * @param evt Describes the event in the cache.↵ | | 19 | * @param evt Describes the event in the cache.↵
|
20 | */↵ | | 20 | */↵
|
21 | public void objectRemoved(ObjectCacheChangeEvent evt)↵ | | 21 | public void objectRemoved(ObjectCacheChangeEvent evt)↵
|
22 | {↵ | | 22 | {↵
|
23 | Object obj = evt.getObject();↵ | | 23 | Object obj = evt.getObject();↵
|
24 | if (obj instanceof ISQLAlias)↵ | | 24 | if (obj instanceof ISQLDriver)↵
|
25 | {↵ | | 25 | {↵
|
26 | removeAlias((ISQLAlias)obj) | | 26 | removeDriver((ISQLDriver)obj)
|