You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bsf-dev@jakarta.apache.org by "Rony G. Flatscher" <Ro...@wu-wien.ac.at> on 2005/08/17 22:31:57 UTC
Curious about event processing in scripts needing the event objects
as well ...
Hi there,
just out of curiosity at the moment: how would one proceed to invoke
scripts and supply them with the event object as well?
At the moment the default event processor (BSFEventProcessor) dispatches
only the script to the engine using "exec", which does not allow for
supplying arguments. Peeking around the code I can see that the event
adapters themselves are using
EventAdapterImpl.setEventProcessor(EventProcessor) to set the default
event processor. Maybe I am overseeing the obvious, but I have not found
a way to set a different event processor (one that would supply the
event object as an argument, dispatching the script in the case an event
occurs via apply() - or call() for that matter to allow for call-back
semantics supplying the event object - instead of exec()).
Any hints/help highly appreciated!
Regards,
---rony
---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org
Re: Curious about event processing in scripts needing the event objects
as well ...
Posted by "Rony G. Flatscher" <Ro...@wu-wien.ac.at>.
Hi Sanka,
thank you for your feedback (and double-checking)!
How about coming up with an additional interface allowing the submitting
of the event-object? If so, what would you think to be the best approach?
Regards,
---rony
---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org
Re: Curious about event processing in scripts needing the event objects
as well ...
Posted by Sanka Samaranayake <ss...@gmail.com>.
Hi Rony,
Rony G. Flatscher wrote:
> Hi there,
>
> just out of curiosity at the moment: how would one proceed to invoke
> scripts and supply them with the event object as well?
>
> At the moment the default event processor (BSFEventProcessor)
> dispatches only the script to the engine using "exec", which does not
> allow for supplying arguments. Peeking around the code I can see that
> the event adapters themselves are using
> EventAdapterImpl.setEventProcessor(EventProcessor) to set the default
> event processor. Maybe I am overseeing the obvious, but I have not
> found a way to set a different event processor (one that would supply
> the event object as an argument, dispatching the script in the case an
> event occurs via apply() - or call() for that matter to allow for
> call-back semantics supplying the event object - instead of exec()).
yes, you are absolutely correct. At the moment the default event
processor dispatches scripts to the engine using exec() in the event of
an occurance of an event and there is no way to supply arguments or an
event object as for that matter
>
> Any hints/help highly appreciated!
>
> Regards,
>
> ---rony
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bsf-dev-help@jakarta.apache.org
>
>
Sanka
---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org