Hi Guillaume,

On Mon, Aug 1, 2016 at 4:50 PM, Guillaume Lucazeau <glucaz...@gmail.com> wrote:
> ...I was thinking I could upload JSON files in a watched folder, containings
> information for the command (type, root path, data to update etc.) and that
> a service could read them, and create "tasks" resources, that later my
> command consumer would handle....

The OSGi Installer does something similar but it's really about
installing and removing things, in your case I assume once a command
is executed you don't want to keep track of it anymore so not sure if
it's a good model. Writing an adapter (for a specific file extension
for example) shouldn't be hard however, if you want to try this
approach.

OTOH the file system provider for the Installer does a lot of what you
need and you might be able to adapt its code, but in the meantime I
suspect commons IO's FileAlterationObserver. [1] would work for you
without having to write much code.

-Bertrand

[1] 
https://commons.apache.org/proper/commons-io/javadocs/api-2.4/org/apache/commons/io/monitor/FileAlterationObserver.html

Reply via email to