You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2004/08/16 07:34:54 UTC

Another facility in the making...

Gang,

I am having some trouble getting certain features in the Http Facility to 
work, and needed a runtime view of the internals of things.

So, I took some old code I have laying in around since 1998, twisted it a bit 
and made it into the Reflector Facility.

The Reflector is a kind of poor man's JMX. It allows you to traverse any 
public fields, as well as getXXX() fields inside your application. You can 
also change values or instantiate/assign new objects, but that is ONLY so if 
the field is public or the class has a proper setXXX() method.

I will continue by refactoring it, since the code is pretty messy, but 
all-in-all it is a pretty nifty tool for server side troubleshooting. Except 
for breaking apart some concerns, and the special handling for Map, 
Collection, Dictionary and arrays, I will also attempt to XMLize the data, so 
we can plugin some neat looks later, or use the raw interface for other 
purposes later.

You should be able to view a small demo on Alex server at 
http://karasulu.homeip.net:8080/inspect/
(note, the trailing slash is significant atm)

In this demo, only the "composition model" is registered as a root object, but 
any object in an application could be registered as a root.


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Another facility in the making...

Posted by Scott Brickner <sc...@brickner.net>.
Just FYI - the Apache JXPath project has some very similar code. You can
use XPath-style expressions to traverse an arbitrary object graph. You
can modify properties, and you can add new objects to the graph.

All this comes automagically through JavaBean Introspection, but they
also have mechanisms to extend it to non-JavaBean classes, too.

On Mon, 2004-08-16 at 01:34, Niclas Hedhman wrote:
> Gang,
> 
> I am having some trouble getting certain features in the Http Facility to 
> work, and needed a runtime view of the internals of things.
> 
> So, I took some old code I have laying in around since 1998, twisted it a bit 
> and made it into the Reflector Facility.
> 
> The Reflector is a kind of poor man's JMX. It allows you to traverse any 
> public fields, as well as getXXX() fields inside your application. You can 
> also change values or instantiate/assign new objects, but that is ONLY so if 
> the field is public or the class has a proper setXXX() method.
> 
> I will continue by refactoring it, since the code is pretty messy, but 
> all-in-all it is a pretty nifty tool for server side troubleshooting. Except 
> for breaking apart some concerns, and the special handling for Map, 
> Collection, Dictionary and arrays, I will also attempt to XMLize the data, so 
> we can plugin some neat looks later, or use the raw interface for other 
> purposes later.
> 
> You should be able to view a small demo on Alex server at 
> http://karasulu.homeip.net:8080/inspect/
> (note, the trailing slash is significant atm)
> 
> In this demo, only the "composition model" is registered as a root object, but 
> any object in an application could be registered as a root.
> 
> 
> Cheers
> Niclas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org