Quoting Rickard Öberg <[email protected]>:
> On 2010-12-08 17.37, Paul Merlin wrote:
> > It use two entities, Schedule and Task. There is no directly usable
> > TaskEntity for now but code is provided so that you can write your taks
> > with something
> > 
> > like:
> >    @Mixins(FooTaskMixin.class)
> >    interface FooTaskEntity extends Task, EntityComposite {}
> >    
> >    class FooTaskMixin implements TaskBehavior { void run() {...} }
> 
> This might be a stupid question, but could the required interface of a
> Task simply be Runnable? If not, why?

Actually it is.

  interface TaskBehavior extends Runnable {}

But you're right, for now I could simply get rid of TaskBehavior and use only 
Runnable.

 
> > That way you can add state specific to your task and implement the
> > behavior with the code you want to be run when the task is run.
> > 
> > The SchedulerService use a pulse-thread with a configurable rhythm that
> > enqueue tasks in a thread pool (size is configurable too).
> 
> Something like an Executor?

Sure.


> Are you using Configuration for the configs?

Sure.


> Would it be possible to mirror the Schedules and Tasks as JMX MBeans?
> With the latest stuff I did on that it would be really nice if all admin
> could be done through JMX really.

I did not think about this. Do you mean exposing entities as JMX MBeans ?

 
> Simply do newUnitOfWork() and the current one is automatically paused.
> That works "out of the box".

Ok, wonderful :)


/Paul


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to