Justin Deoliveira wrote: > Arne Kepp wrote: >> (This question pertains to GS 2.0) >> >> The GWC plugin has a class that implements CatalogListener. Among >> other things it implements a method , public void >> handleModifyEvent(CatalogModifyEvent event) >> >> My understanding is that I get at the underlying object by calling >> Object obj = event.getSource() >> >> The objects I am interested in dealing with are CoverageInfo, >> FeatureTypeInfo (ResourceInfo), and LayerGroupInfo , and I need to >> treat each one of those separately. Normally I would just do if(obj >> instanceof ...) , but since LayerGroupInfo comes out as a proxy >> object ($Proxy21) it doesn't work. > The proxy should implement the LayerGroupInfo interface dynamically, > so it should be transparent to the client. I suspect some other issue > is popping up here. >> >> I can think of at least two ways to get around this (test for >> specific methods, or use reflection on the proxy object), but I >> suspect there is a correct way of solving this problem? > So the issue is just with LayerGroupInfo? The other interfaces work > ok? My suspicion is that somewhere there is some double proxying going > on. So this is probably just a bug. If you can verify it is just LGI I > will look into it. >> >> Thanks Justin ;) >> -Arne
The easiest case to reproduce is to take Catalog cat, and then cat.getLayerGroups().iterator(); Everything that comes out of that iterator is $Proxy21 , which (inspecting using eclipse) has h = ModificationProxy , which again has proxyObject LayerGroupInfoImpl The other types appear to be fine. I used the event as an example because in that case I don't know what the data is beforehand. -Arne -- Arne Kepp OpenGeo - http://opengeo.org Expert service straight from the developers ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
