There are different ways:
 * add some properties to control the window where we want polling to occur
 * the polling endpoint could be a provider which would expose an interface
    (on the jbi bus) to suspend / resume polling.  This could also be
done on the component
    with a kind of "management interface" (a JBI endpoint) where you could
    suspend / resume a specific endpoint.
 * create another type of endpoint, a new poller, but which would be a
    provider rather than a consumer.  When receiving an InOut exchange,
    it would poll for a single file.  This could be used with another type
    of polling endpoint, which would only detect changes and send a
notification
    event instead of sending the actual content.  Philip Dodds was
talking about
    that.

I like the second idea which should not be too hard to implement on
the component.
This would also allow to create additional management operations to dynamically
create a consumer endpoint (provider endpoints can be dynamically created
using endpoint resolution).  This management interface could be somehow
common to all servicemix BCs.  We need to define a nice WSDL for it in
servicemix-common and make all components activate a JBI endpoint.
Given this, we could easily use URIs to automatically create BC consumer
endpoints at deployment time if a service engine has some needed metadata.

This endpoint could be then called by a quartz component, so that you
could defined time windows where you want your endpoint to be active.

However, the first solution would be easier to implement and there would
be no problems to determine the state of the endpoint when the SU
is started: if we use a quartz component, it needs a way to know that
the JBI endpoint has been activate to send a message to suspend / resume
it depending on the current time wrt to the defined windows.  But I
suspect that a single property would not be sufficient, and that you would
need to embed quartz to handle cron expressions...

So the third solution (at least the provider poller endpoint) could also
be a good fit.  You would need another component to be able to
send requests to the poller and redirect them, and you could configure
the time windows definitions on it.

Thoughts ?

On 10/31/06, abrighton <[EMAIL PROTECTED]> wrote:

Thanks, it works now.

Another question: Suppose I want to poll the ftp server only at certain
times: For example only
once a week on a Friday at 12:00? Maybe we could add a property for this to
the endpoint class
that could be used in place of "delay", if set. Would it make sense to use
Quartz for this?
Are there any JBI components that do something similar?

Thanks,
Allan


gnodet wrote:
>
> I've committed the fix, thx.
> Btw, i moved the test up in the loop, so that
> "." and ".." are checked first, before checking
> the file type.
>

--
View this message in context: 
http://www.nabble.com/servicemix-ftp%3A-FtpPollingEndpoint--tf2540539.html#a7092077
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to