giacomo wrote:
> On Tue, 5 Mar 2002, Berin Loritsch wrote:
> 
> 
>>Torsten Curdt wrote:
>>
>>>Berin, I'm wondering... How far did you get with your idea of active
>>>monitoring of resources?
>>>
>>>I remember a thread were some profiling sessions showed that checking the
>>>last modification time of resources can be quite expensive and has an
>>>impact on scaleability. This might be solved or worked around by the
>>>DelayedRefreshSourceWrapper class. But active monitoring will (IMHO) not
>>>only help to solve scaleability issues but is much more elegant and easier
>>>to maintain in the codebase.
>>>
>>>Whereever you are you need to check for a resource to change you can get
>>>the ActiveMonitor component and add your class as ResourceChangeListener.
>>>I often wished to have such a component for self-written components...
>>>
>>
>>It is functioning and released.  I will eventually have a version that
>>hooks into the CommandManager code that I am working on.  The
>>CommandManager is functional, but the API may be cleaned up some.  It is
>>really simple to use too.
>>
>>Check out Excalibur code: the ActiveMonitor comes with classes that
>>monitor files.  You would have to write the code that monitors other
>>types of resources as well.
>>
> 
> I have written a Monitor Component that is able to monitor a directory
> level for file being created/modified/outdated/deleted. Unfortunately it
> doesn't fit very well into the concept of the "lastModified" property
> Resources have today.
> 
> Any suggestion how to make such things work in the current incarnation
> of the Monitor API?


You can change the parameter or type of event fired.  The abstract
resource defaults to a lastModified property--but I don't think it
locks you into that.



-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to